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

Additional PHP 8 deprecation warnings/errors #4773

Closed
gchilders opened this issue Jun 10, 2022 · 1 comment
Closed

Additional PHP 8 deprecation warnings/errors #4773

gchilders opened this issue Jun 10, 2022 · 1 comment

Comments

@gchilders
Copy link
Contributor

On load of prefs.php?subset=project, I'm getting this additional warning with PHP 8.1:

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

On load of forum_post.php?id=7, I'm getting

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/boincadm/projects/nfs/html/user/forum_post.php on line 126

Loading of cert1.php fails with

Fatal error: Uncaught ArgumentCountError: time() expects exactly 0 arguments, 1 given in /home/boincadm/projects/nfs/html/user/cert1.php:27 Stack trace: #0 /home/boincadm/projects/nfs/html/user/cert1.php(27): time() #1 {main} thrown in /home/boincadm/projects/nfs/html/user/cert1.php on line 27

Similarly for cert_all.php

Fatal error: Uncaught ArgumentCountError: time() expects exactly 0 arguments, 1 given in /home/boincadm/projects/nfs/html/user/cert_all.php:28 Stack trace: #0 /home/boincadm/projects/nfs/html/user/cert_all.php(28): time() #1 {main} thrown in /home/boincadm/projects/nfs/html/user/cert_all.php on line 28

For cert_all.php, changing time(0) to time() fixes that issues, but then there are many additional warnings such as

Warning: Attempt to read property "total_credit" on string in /home/boincadm/projects/nfs/html/user/cert_all.php on line 48
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

On the backend ops pages, I'm seeing similar warnings in various places:

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/boincadm/projects/nfs/html/ops/db_action.php on line 33

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/boincadm/projects/nfs/html/inc/db_ops.inc on line 374

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

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

Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/boincadm/projects/nfs/html/ops/mass_email.php on line 46

@gchilders
Copy link
Contributor Author

Also, importantly, login_form.php:

Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /home/boincadm/projects/nfs/html/inc/bootstrap.inc:435 Stack trace: #0 /home/boincadm/projects/nfs/html/inc/bootstrap.inc(435): implode() #1 /home/boincadm/projects/nfs/html/inc/account.inc(160): form_checkboxes() #2 /home/boincadm/projects/nfs/html/user/login_form.php(53): login_form() #3 {main} thrown in /home/boincadm/projects/nfs/html/inc/bootstrap.inc on line 435

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

No branches or pull requests

2 participants