Andi
At 09:30 PM 12/21/2003 +0100, Christian Schneider wrote:
Derick Rethans wrote:By browsing over it it seems that this patch looks wrong, as you forgot to add E_STRICT to E_ALL in line 944 and it would also be better to use zend_parse_parameters.
Thanks for your help on improving the patch.
I used E_ALL because that's what was proposed by people here on the list. I changed it to E_ALL | E_STRICT now to have the old catch-all behaviour as default.
I copied the parameter parsing from trigger_error but I'm glad you pointed out zend_parse_parameters. It's never bad to learn :-)
The updated patch can (again) be found at http://cschneid.com/php/php5/set_error_handler_reporting_parameter.patch
Also because I *really* think that we should not touch this anyway, I did some research and found the following bits of information that clearly describe that the current behavior is 100% *correct* and wanted.
The behaviour is completely unchanged if you don't specify the optional parameter. It is just extended because there are people who need finer control over this. And the rule is quite simple to describe: If you specify an error_reporting in set_error_handler() only those errors will be passed to your custom handler. Everything else will go to the default error handler.
I also added a testcase at http://cschneid.com/php/php5/set_error_handler.phpt
- Chris
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php