You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the latest changes for PHP 8, I'm seeing an error loading home.php using PHP 8.1:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, stdClass given in /home/boincadm/projects/nfs/html/inc/user.inc:84 Stack trace: #0 /home/boincadm/projects/nfs/html/user/home.php(30): get_other_projects() #1 {main} thrown in /home/boincadm/projects/nfs/html/inc/user.inc on line 84
As a quick fix, I added a cast of the variable to type array on line 84 of user.inc:
if (count((array) $remote) == 1) {
This lead to similar errors on lines 118 and 120 of user.inc.
The text was updated successfully, but these errors were encountered:
After the latest changes for PHP 8, I'm seeing an error loading home.php using PHP 8.1:
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, stdClass given in /home/boincadm/projects/nfs/html/inc/user.inc:84 Stack trace: #0 /home/boincadm/projects/nfs/html/user/home.php(30): get_other_projects() #1 {main} thrown in /home/boincadm/projects/nfs/html/inc/user.inc on line 84
As a quick fix, I added a cast of the variable to type array on line 84 of user.inc:
if (count((array) $remote) == 1) {
This lead to similar errors on lines 118 and 120 of user.inc.
The text was updated successfully, but these errors were encountered: