restore_error_handler() to default error handler

From: Date: Tue, 14 Jan 2003 08:20:54 +0000
Subject: restore_error_handler() to default error handler
Groups: php.general 
Request: Send a blank email to php-general+get-131522@lists.php.net to get a copy of this message
Hi, I was playing around with error handlers, and tried this: <?php error_reporting(E_ALL ^ E_NOTICE); function ErrorHandler($_ErrorNumber_, $_ErrorString_, $_ErrorFile_, $_ErrorLine_, $_ErrorContext_) { mail("brian@gzmarketing.com", "Error", "Blah blah blah"); } set_error_handler("ErrorHandler"); ... ?> 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 was finally able to get it to stop by re-declaring the function without the mail() call, but how do I restore PHP's default error handler? I haven't had any success with restore_error_handler(); Thanks, Brian

« previous php.general (#131522) next »