note 111964 added to function.set-error-handler
| From: | generate at itnobody dot com | Date: | Wed, 17 Apr 2013 16:14:31 +0000 |
| Subject: | note 111964 added to function.set-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194521@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.199
Probable Submitter: 134.29.239.140
----
Manual Page -- http://php.net/manual/en/function.set-error-handler.php
Edit -- https://master.php.net/note/edit/111964
Del: integrated -- https://master.php.net/note/delete/111964/integrated
Del: useless -- https://master.php.net/note/delete/111964/useless
Del: bad code -- https://master.php.net/note/delete/111964/bad+code
Del: spam -- https://master.php.net/note/delete/111964/spam
Del: non-english -- https://master.php.net/note/delete/111964/non-english
Del: in docs -- https://master.php.net/note/delete/111964/in+docs
Del: other reasons-- https://master.php.net/note/delete/111964
Reject -- https://master.php.net/note/reject/111964
Search -- https://master.php.net/manage/user-notes.php