From: [EMAIL PROTECTED]
Operating system: Solaris 8
PHP version: 4.0.5
PHP Bug Type: *Function Specific
Bug description: set_error_handler () is not catching all errors
Short, sample function listed to quickly illustrate issue:
[root@helpdesk bin]# more err.php
<?php
function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) {
echo "USER ERROR HANDLER:";
echo " -- errno:$errno";
echo " -- errmsg:$errmsg";
echo " -- filename:$filename";
echo " -- linenum:$linenum";
echo "\n";
}
$old_error_handler = set_error_handler("userErrorHandler");
trigger_error("E_USER_ERROR", E_USER_ERROR);
trigger_error("E_USER_WARNING", E_USER_WARNING);
trigger_error("E_USER_NOTICE", E_USER_NOTICE);
this_function_does_not_exist();
?>
[root@helpdesk bin]# ./php -q err.php
USER ERROR HANDLER: -- errno:256 -- errmsg:E_USER_ERROR -- filename:err.php --
linenum:13
USER ERROR HANDLER: -- errno:512 -- errmsg:E_USER_WARNING -- filename:err.php --
linenum:14
USER ERROR HANDLER: -- errno:1024 -- errmsg:E_USER_NOTICE -- filename:err.php --
linenum:15
<br>
<b>Fatal error</b>: Call to undefined function: this_function_does_not_exist() in
<b>err.php</b> on line <b>16</b><br>
[root@helpdesk bin]#
--
Edit Bug report at: http://bugs.php.net/?id=10934&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]