diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-23 00:55:51 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-23 00:55:51 +1000 |
| commit | d8474a488855ea550e92a9cdc0b7e2ef92d2953c (patch) | |
| tree | 4192a7ea82a73257d4524e14e53d0ca1352c8e04 /inc | |
| parent | ec21acbeafe62cbd0782c08b269ff141bc47fdae (diff) | |
yes it will work
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/functions.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index 1b2a0635..3830e90a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -98,10 +98,17 @@ function fatal_error_handler() { if($error = error_get_last()) { - error('Caught fatal error: ' . $error['message'] . ' in <strong>' . $error['file'] . '</strong> on line ' . $error['line']); + if($error['type'] == E_ERROR) { + if(function_exists('error')) { + error('Caught fatal error: ' . $error['message'] . ' in <strong>' . $error['file'] . '</strong> on line ' . $error['line']); + } else { + header('Content-Type: text/plain'); + echo 'Caught fatal error: ' . $error['message'] . ' in ' . $error['file'] . ' on line ' . $error['line']; + } + } } } - //register_shutdown_function('fatal_error_handler'); + register_shutdown_function('fatal_error_handler'); // Memcached function memcached_open() { |
