On Tue, 14 Jan 2003 01:20:54 -0700, you wrote:

>Hi,
>
>I was playing around with error handlers, and tried this:
[...]
>Which worked just fine.  A little too good, in fact.
>
>I got over 1,200 emails in a matter of minutes (high traffic site).

I'm not sure whey restore_error_handler() isn't working, but I have
something else which may help you.  When you use a custom error
handler your function will handle ALL errors, regardless of your
current error_reporting level.  To make your function honor the
current error_reporting level, put this line at the top of your
function:

if (!($_ErrorNumber_ & error_reporting())) return;

This will also allow your function to ignore errors on function calls
that you have prefixed with an '@', since the '@' temporarily sets the
error_reporting level to 0.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to