fix compatibility with php72

This commit is contained in:
xiaomlove
2021-01-04 20:47:22 +08:00
parent d8a3f5270f
commit 752e26000c
6 changed files with 40 additions and 34 deletions

View File

@@ -300,12 +300,12 @@ if ($CURUSER && $showpolls_main == "yes")
$os = array();
// Count votes
while (($arr2 = mysql_fetch_row($res) !== null) && isset($vs[$arr2[0]]))
while (($arr2 = mysql_fetch_row($res) !== null) && isset($arr2[0]) && isset($vs[$arr2[0]]))
$vs[$arr2[0]] ++;
reset($o);
for ($i = 0; $i < count($o); ++$i){
if ($o[$i])
if (isset($vs[$i]) && isset($o[$i]) && $o[$i])
$os[$i] = array($vs[$i], $o[$i], $i);
}