Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even more PHP 8 deprecation warnings/errors #4776

Closed
gchilders opened this issue Jun 11, 2022 · 2 comments · Fixed by #4777
Closed

Even more PHP 8 deprecation warnings/errors #4776

gchilders opened this issue Jun 11, 2022 · 2 comments · Fixed by #4777

Comments

@gchilders
Copy link
Contributor

Thanks for cleaning these up so quickly! I'm seeing two more persist, and one that I didn't catch earlier:

home.php:

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:118 Stack trace: #0 /home/boincadm/projects/nfs/html/inc/user.inc(563): show_other_projects() #1 /home/boincadm/projects/nfs/html/inc/bootstrap.inc(263): {closure}() #2 /home/boincadm/projects/nfs/html/inc/user.inc(574): grid() #3 /home/boincadm/projects/nfs/html/user/home.php(52): show_account_private() #4 {main} thrown in /home/boincadm/projects/nfs/html/inc/user.inc on line 118

cert_all.php:

Warning: Attempt to read property "total_credit" on string in /home/boincadm/projects/nfs/html/user/cert_all.php on line 48 (lots of these)
Warning: Undefined property: stdClass::$total_credit in /home/boincadm/projects/nfs/html/user/cert_all.php on line 48
Warning: Attempt to read property "total_credit" on string in /home/boincadm/projects/nfs/html/user/cert_all.php on line 83 (lots of these)

prefs_edit.php?subset=project

Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /home/boincadm/projects/nfs/html/inc/util.inc on line 1047

@gchilders
Copy link
Contributor Author

gchilders commented Jun 11, 2022

Those changes to user.inc lead to the following errors:

home.php:

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:82 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 82

cert_all.php:

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:82 Stack trace: #0 /home/boincadm/projects/nfs/html/user/cert_all.php(40): get_other_projects() #1 {main} thrown in /home/boincadm/projects/nfs/html/inc/user.inc on line 82

@gchilders
Copy link
Contributor Author

Also add
if (!$x) return $x;
to sanitize_tags() on line 1027 of util.inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants