No Code Attached Yet
avatar PhilETaylor
PhilETaylor
18 Apr 2021

170 uses in Joomla 4 - mainly in libraries, 63 in upstream packages

https://www.php.net/manual/en/reserved.variables.phperrormsg.php

Version Description
PHP 8.0.0 Directive track_errors which caused $php_errormsg to be available has been removed.
PHP 7.2.0 Directive track_errors which caused $php_errormsg to be available has been deprecated.

Screenshot 2021-04-18 at 15 58 15

avatar PhilETaylor PhilETaylor - open - 18 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Apr 2021
avatar PhilETaylor PhilETaylor - change - 18 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 18 Apr 2021
avatar PhilETaylor PhilETaylor - change - 18 Apr 2021
Title
[4] Directive track_errors which caused $php_errormsg to be available has been removed.
[4][PHP8] Directive track_errors which caused $php_errormsg to be available has been removed.
avatar PhilETaylor PhilETaylor - edited - 18 Apr 2021
avatar PhilETaylor PhilETaylor - change - 18 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 18 Apr 2021
avatar PhilETaylor PhilETaylor - change - 18 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 18 Apr 2021
avatar richard67
richard67 - comment - 18 Apr 2021

So we should use error_get_last() and get the 'message' element where we now use $php_errormsg, right?

avatar PhilETaylor
PhilETaylor - comment - 18 Apr 2021

docs comments also say:

If an error handler (see set_error_handler ) successfully handles an error then that error will not be reported by this function.

so that will need testing too,

Maybe something like this which we use for deprecated errors in libraries/bootstrap.php might work for Notice/Warnings - no idea - not tested - looks like a nicerway to handle warnings and errors and would allow us to remove all @ suppression in Joomla 4?

set_error_handler(['Joomla\CMS\Exception\ExceptionHandler', 'handleUserDeprecatedErrors'], E_USER_DEPRECATED);

avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:37:48
Closed_By PhilETaylor
Labels Added: No Code Attached Yet
Removed: ?
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment