Bug #10934: set_error_handler () is not catching all errors

From: Date: Thu, 17 May 2001 17:12:53 +0000
Subject: Bug #10934: set_error_handler () is not catching all errors
Groups: php.dev 
Request: Send a blank email to php-dev+get-55646@lists.php.net to get a copy of this message
From: melissa@everseek.com 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

« previous php.dev (#55646) next »