Skip to content

Commit faddb89

Browse files
committed
Remove onShutdown error handler
It was causing an additional DBALException when there is no DB connection. The logger was trying to access to the DB during the shutdown process, causing an unhandled exception to appear in apache
1 parent 9111ba0 commit faddb89

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/private/Log/ErrorHandler.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,13 @@ public static function register($debug=false) {
5050
} else {
5151
\set_error_handler([$handler, 'onError']);
5252
}
53-
\OC::$server->getShutdownHandler()->register(function () use ($handler) {
54-
$handler->onShutdown();
55-
});
5653
\set_exception_handler([$handler, 'onException']);
5754
}
5855

5956
public static function setLogger(ILogger $logger) {
6057
self::$logger = $logger;
6158
}
6259

63-
//Fatal errors handler
64-
public static function onShutdown() {
65-
$error = \error_get_last();
66-
if ($error && self::$logger) {
67-
//ob_end_clean();
68-
$msg = $error['message'] . ' at ' . $error['file'] . '#' . $error['line'];
69-
self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
70-
}
71-
}
72-
7360
/**
7461
* Uncaught exception handler
7562
*

0 commit comments

Comments
 (0)