>> Code: >> function default_error_handler($code, $error, $file, $line) { >> switch ($code) { >> case E_ERROR: >> die ("Error: $error"); >> case E_WARNING: >> die("Warning: $error"); >> default: >> die("Something else entirely: $error"); >> } >> } >> set_error_handler('default_error_handler'); >> require('This file does not exist. At least not here!'); >> >> Result: >> Warning: require(This file does not exist. At least not here!) >> [function.require]: failed to open stream: No such file or directory >> >> Expected Result: >> Error: require(This file does not exist. At least not here!) >> [function.require]: failed to open stream: No such file or directory >> > > If you comment out the 'set_error_handler' line what happens? Do you get > what you expect (and what should happen) ? > > It looks like a pretty simple bug report to me but others may have > reasons why it's not working. Without the error handler, I get the expected result: A fatal error with the script dying. That is what makes this so mysterious. Doesn't make sense that it would raise a different kind of error under different circumstances. It should have the same value every time. I'm going to sit on this for a day or so and see what people say before I toss it over to the bug folks. No sense in bothering them if I'm being a bonehead. (o; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php