diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -164,7 +164,7 @@ static function error($p = array()) return null; # prevent recursion if (!error_reporting() || $p[0] === false || $p['title'] === false) # called with @ or suppressed - return null; + return $p['fatal'] ? exit(99) : null; if ($_SERVER['REMOTE_ADDR']) $url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; # we ignore https for easier debugging @@ -239,8 +239,11 @@ static function error($p = array()) } } - if ($p['fatal'] && $_SERVER['REMOTE_ADDR'] && !headers_sent()) - http_response_code(500); + if ($p['fatal'] && $_SERVER['REMOTE_ADDR']) + { + @http_response_code(500); + echo "<!DOCTYPE html><html><head><title></title></head><body>Internal Server Error</body></html>"; + } if ($toscreen || $sendmail) { @@ -299,10 +302,7 @@ static function error($p = array()) it::log("/tmp/alertdata/alertlog", $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']}") . " Url: $url" . ($p['body'] ? "\n" . substr(D($p['body']), 0, 5000) . "\n" : "")); - if ($p['fatal']) - exit(99); - - return null; + return $p['fatal'] ? exit(99) : null; } |