When compiled with #ifdef ZTS, zend_error invokes pthread_get_specific.
The performance analyzer tool indicated that zend_error was being
invoked during normal processing of requests, even though no error
messages were logged. The source of these calls were E_NOTICE
messages.
Please review the attached patch which introduces a REPORT_ERROR macro
to avoid invoking the zend_error function when the error reporting
level indicates that E_NOTICE
messages are not to be reported.
Although, all these codepaths are not executed, I guarded all E_NOTICE
messages using the REPORT_ERROR macro.
thanks,
arvi
When compiled with #ifdef ZTS, zend_error invokes pthread_get_specific.
The performance analyzer tool indicated that zend_error was being
invoked during normal processing of requests, even though no error
messages were logged. The source of these calls wereE_NOTICE
messages.Please review the attached patch which introduces a REPORT_ERROR macro
to avoid invoking the zend_error function when the error reporting
level indicates thatE_NOTICE
messages are not to be reported.
Although, all these codepaths are not executed, I guarded allE_NOTICE
messages using the REPORT_ERROR macro.
This is a bad idea, because the error handler does other things as well.
This is quite a bit of a BC break.
regards,
Derick
--
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr
This is a bad idea, because the error handler does other things as well.
If the error reporting level indicates that the user is not interested
in E_FOO, why would there be an expectation that zend_error be invoked
for E_FOO messages?
Arvi
This is a bad idea, because the error handler does other things as
well.If the error reporting level indicates that the user is not interested
in E_FOO, why would there be an expectation that zend_error be invoked
for E_FOO messages?
error_reporting setting is related to automatic reactions on errors
only.
but php provides additional means to get last-error manually which
should work without relation to this setting