--- a/includes/userlist.php +++ b/includes/userlist.php @@ -16,11 +16,13 @@ while($u = dbassoc($users)) { $userlist[$u['uid']] = $u['username']; } -if(is_countable($userlist) > 0) { - $x = 0; - foreach($userlist as $k => $v) { - echo "userList[$x] = new Array('$k','$v');\n"; - $x++; +if($userlist) { + if(count($userlist) > 0) { + $x = 0; + foreach($userlist as $k => $v) { + echo "userList[$x] = new Array('$k','$v');\n"; + $x++; + } } } ?>