]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if logger is set, also no need to return true
authorBart Visscher <bartv@thisnet.nl>
Mon, 8 Jul 2013 16:26:11 +0000 (18:26 +0200)
committerBart Visscher <bartv@thisnet.nl>
Mon, 8 Jul 2013 16:26:11 +0000 (18:26 +0200)
lib/log/errorhandler.php

index 2a57cbc594f00e3023ed5d90105e3535b5553efb..69cb960de915268fac38ac2cf5c0dacb77e507dc 100644 (file)
@@ -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;
                }
        }