diff options
Diffstat (limited to 'lib/private/Log/ErrorHandler.php')
-rw-r--r-- | lib/private/Log/ErrorHandler.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/Log/ErrorHandler.php b/lib/private/Log/ErrorHandler.php index 7561486a4a9..5d846da17ce 100644 --- a/lib/private/Log/ErrorHandler.php +++ b/lib/private/Log/ErrorHandler.php @@ -44,15 +44,15 @@ class ErrorHandler { $handler = new ErrorHandler(); if ($debug) { - set_error_handler(array($handler, 'onAll'), E_ALL); + set_error_handler([$handler, 'onAll'], E_ALL); if (\OC::$CLI) { - set_exception_handler(array('OC_Template', 'printExceptionErrorPage')); + set_exception_handler(['OC_Template', 'printExceptionErrorPage']); } } else { - set_error_handler(array($handler, 'onError')); + set_error_handler([$handler, 'onError']); } - register_shutdown_function(array($handler, 'onShutdown')); - set_exception_handler(array($handler, 'onException')); + register_shutdown_function([$handler, 'onShutdown']); + set_exception_handler([$handler, 'onException']); } public static function setLogger(ILogger $logger) { @@ -65,7 +65,7 @@ class ErrorHandler { if($error && self::$logger) { //ob_end_clean(); $msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line']; - self::$logger->critical(self::removePassword($msg), array('app' => 'PHP')); + self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']); } } @@ -87,14 +87,14 @@ class ErrorHandler { return; } $msg = $message . ' at ' . $file . '#' . $line; - self::$logger->error(self::removePassword($msg), array('app' => 'PHP')); + self::$logger->error(self::removePassword($msg), ['app' => 'PHP']); } //Recoverable handler which catch all errors, warnings and notices public static function onAll($number, $message, $file, $line) { $msg = $message . ' at ' . $file . '#' . $line; - self::$logger->debug(self::removePassword($msg), array('app' => 'PHP')); + self::$logger->debug(self::removePassword($msg), ['app' => 'PHP']); } |