From:             [EMAIL PROTECTED]
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


-- 
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]

Reply via email to