diff --git a/lib/log/errorhandler.php b/lib/log/errorhandler.php index 2a57cbc594f..69cb960de91 100644 --- a/lib/log/errorhandler.php +++ b/lib/log/errorhandler.php @@ -29,12 +29,10 @@ class ErrorHandler { //Fatal errors handler public static function onShutdown() { $error = error_get_last(); - if($error) { + if($error && self::$logger) { //ob_end_clean(); $msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line']; self::$logger->critical($msg, array('app' => 'PHP')); - } else { - return true; } }