Browse code

includes/userlist.php: PHP 5+ support

Clarissa Walker authored on 2026/10/31 22:21:23
Showing 1 changed files
... ...
@@ -16,11 +16,13 @@ echo "var element = '".$_GET['element']."';\n";
16 16
 while($u = dbassoc($users)) {
17 17
 	$userlist[$u['uid']] = $u['username'];
18 18
 }
19
-if(is_countable($userlist) > 0) {
20
-	$x = 0;
21
-	foreach($userlist as $k => $v) {
22
-		echo "userList[$x] =  new Array('$k','$v');\n";
23
-		$x++;
19
+if($userlist) {
20
+	if(count($userlist) > 0) {
21
+		$x = 0;
22
+		foreach($userlist as $k => $v) {
23
+			echo "userList[$x] =  new Array('$k','$v');\n";
24
+			$x++;
25
+		}
24 26
 	}
25 27
 }
26 28
 ?>