Check if logger is set, also no need to return true

remotes/origin/stable6
Bart Visscher 13 years ago
parent 2db839c4d3
commit 4a6803ef9d
  1. 4
      lib/log/errorhandler.php

@ -29,12 +29,10 @@ class ErrorHandler {
//Fatal errors handler //Fatal errors handler
public static function onShutdown() { public static function onShutdown() {
$error = error_get_last(); $error = error_get_last();
if($error) { if($error && self::$logger) {
//ob_end_clean(); //ob_end_clean();
$msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line']; $msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line'];
self::$logger->critical($msg, array('app' => 'PHP')); self::$logger->critical($msg, array('app' => 'PHP'));
} else {
return true;
} }
} }

Loading…
Cancel
Save