1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Do not assume we have a Logger in ErrorHandler, fixes #666

This commit is contained in:
Jordi Boggiano
2015-10-14 13:47:31 +01:00
parent 5405308eb1
commit ce293c745a

View File

@@ -174,6 +174,7 @@ class ErrorHandler
array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'])
);
if ($this->logger instanceof Logger) {
foreach ($this->logger->getHandlers() as $handler) {
if ($handler instanceof AbstractHandler) {
$handler->close();
@@ -181,6 +182,7 @@ class ErrorHandler
}
}
}
}
private static function codeToString($code)
{