OJS-3.3.0-14
PHP-8.1
I have upgraded php-7.4 to php-8.1 but now I am facing some problems:
Error-1
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /EPUB/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
Error-2
If I try to upload a file the progress bar gets stuck and the next screen doesn’t show up. No error log was generated.
Error-2 resolved. But after upgrading PHP-7.4 to PHP-8.1 the error log is not getting generated.
I have set in php.ini
:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
display_errors = On
log_errors = On
error_log = /PATH/php_errors.log
The above error is resolved but now the PHP Deprecated
log is generated.
OJS-3.3.0-14
PHP-8.1
PHP Deprecated: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/cache/t_compile/a95e9f20492587d73a4f35fa465ca6ee809b9709^c2055d14f27582f3361894f4184ce1a4c0497385_0.app.frontendpagessearchAuthor.php on line 60
PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[08-Aug-2023 16:21:20 Asia/Kolkata] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[08-Aug-2023 16:21:24 Asia/Kolkata] PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /ojs/plugins/generic/citations/CitationsPlugin.inc.php on line 49
[08-Aug-2023 16:21:51 Asia/Kolkata] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[08-Aug-2023 16:21:55 Asia/Kolkata] PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /ojs/plugins/generic/citations/CitationsPlugin.inc.php on line 49
[08-Aug-2023 16:22:04 Asia/Kolkata] PHP Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/cache/t_compile/f09822d526ba2b77dee1b6fa34cba9dcc80abebc^756a7119cb48731a8fd45c250b45f4bcca2d6b01_0.app.frontendpagessearch.tpl.php on line 50
[08-Aug-2023 16:22:04 Asia/Kolkata] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[08-Aug-2023 16:22:04 Asia/Kolkata] PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 36
[08-Aug-2023 16:22:04 Asia/Kolkata] ojs2: 404 Not Found
[08-Aug-2023 16:22:04 Asia/Kolkata] PHP Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /ojs/plugins/generic/citations/CitationsPlugin.inc.php on line 49
PHP Deprecated warnings are notices to the software developers that the code will still work in the selected version of PHP, but that in future versions of PHP this will change.
If you are not writing code for the OJS application, it is safe to suppress notice, deprecated, and strict warnings, per your php.ini sample above.
If the deprecation warnings are still being logged after this php.ini change, then another PHP configuration is overriding this setting.
One additional place to check is the deprecation_warnings
setting in config.inc.php:
Also note that substantial work has gone in to cleanup for PHP 8 in OJS 3.4, so I expect many of the deprecation warnings seen in OJS 3.3 for PHP 8 will no longer be present in 3.4 an later.