Bug #12658: set_error_handler() not working properly (with 'Call to undefined function')

From: Date: Wed, 08 Aug 2001 17:23:32 +0000
Subject: Bug #12658: set_error_handler() not working properly (with 'Call to undefined function')
Groups: php.dev 
Request: Send a blank email to php-dev+get-62588@lists.php.net to get a copy of this message
From: joustin@plusnet.pl Operating system: Red Hat Linux, Win2000 sp2 PHP version: 4.0.6 PHP Bug Type: Scripting Engine problem Bug description: set_error_handler() not working properly (with 'Call to undefined function') Seems that PHP cannot redirect 'Call to undefined function' errors to a custom error handler... A sample (taken partly from the manual): <pre> <?php // Define a simple error handler function error_handler ($level, $message, $file, $line, $context) { echo "An error of level $level was generated in file $file on line $line. \nThe error message was: $message \nThe following variables were set in the scope that the error occurred in: <blockquote> "; print_r ($context); print "\n</blockquote>"; } // Set the error handler to the error_handler() function set_error_handler ('error_handler'); trigger_error ("Some other error"); whatever(); // <- this will crash make the script die without calling the custom error_handler ?> -- Edit bug report at: http://bugs.php.net/?id=12658&edit=1

« previous php.dev (#62588) next »