note 111964 deleted from function.set-error-handler by googleguy

From: Date: Wed, 17 Apr 2013 16:18:12 +0000
Subject: note 111964 deleted from function.set-error-handler by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-194522@lists.php.net to get a copy of this message
Note Submitter: generate at itnobody dot com ---- Be warned! There are countless examples like this for register_shutdown_function and set_error_handler: <?php register_shutdown_function('shutdownFunction'); function shutDownFunction() { $error = error_get_last(); // WOO HOO DO EVERYTHING! } ?> You should really re-read the top of this page; if I did, it would have saved me some headache: if a method is suppressed using @foo; your handler will still be called. error_get_last() will still return the error; regardless of suppression. So spare your log files and check error_reporting() to see if it's actually set before going to town; there's some very annoying repercussions when you start dealing with IMAP or LDAP- or anything where failed authentication results in a warning in these circumstances.

« previous php.notes (#194522) next »