mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Do not assume we have a Logger in ErrorHandler, fixes #666
This commit is contained in:
@@ -174,9 +174,11 @@ class ErrorHandler
|
|||||||
array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'])
|
array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'])
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($this->logger->getHandlers() as $handler) {
|
if ($this->logger instanceof Logger) {
|
||||||
if ($handler instanceof AbstractHandler) {
|
foreach ($this->logger->getHandlers() as $handler) {
|
||||||
$handler->close();
|
if ($handler instanceof AbstractHandler) {
|
||||||
|
$handler->close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user