note 99981 deleted from errorfunc.configuration by danbrown
| From: | danbrown@php.net | Date: | Fri, 17 Sep 2010 18:13:18 +0000 |
| Subject: | note 99981 deleted from errorfunc.configuration by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172698@lists.php.net to get a copy of this message | ||
Note Submitter: carlos dot vini at gmail dot com
----
You can avoid White Screen Of Death doing the hack below (I found it while reading this blog: http://coldfrontlabs.ca/)
/**
* Checks for Fatal Error preventing White Screen
*
* @return void
*/
function check_shutdown() {
$lasterror = error_get_last();
if ($lasterror['type'] == E_ERROR) { // Is it a Fatal Error?
// Do something, redirect? output message? You choose.
}
}
// Registers the shutdown function
register_shutdown_function('check_shutdown');