mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Fixed callback factory for the FingersCrossedHandler
This commit is contained in:
@@ -62,8 +62,11 @@ class FingersCrossedHandler extends AbstractHandler
|
||||
}
|
||||
if ($record['level'] >= $this->actionLevel) {
|
||||
$this->buffering = false;
|
||||
if (!$this->handler instanceof AbstractHandler) {
|
||||
$this->handler = $this->handler($record, $this);
|
||||
if (!$this->handler instanceof HandlerInterface) {
|
||||
$this->handler = call_user_func_array($this->handler, array($record, $this));
|
||||
}
|
||||
if (!$this->handler instanceof HandlerInterface) {
|
||||
throw new \RuntimeException("The factory callback should return an HandlerInterface");
|
||||
}
|
||||
foreach ($this->buffer as $record) {
|
||||
$this->handler->handle($record);
|
||||
|
Reference in New Issue
Block a user