mirror of
https://github.com/nextcloud/server.git
synced 2024-07-29 20:15:55 +02:00
Check if logger is set, also no need to return true
This commit is contained in:
parent
2db839c4d3
commit
4a6803ef9d
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user