Browse code

includes/userlist.php: Fix Uncaught TypeError in PHP 8 for the Co-Authors field when you use a starting character that yields no results

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