Просмотр исходного кода

Merge pull request #1512 from perevoshchikov/fix/handler-wrapper

Adds return value in handler wrapper
Jordi Boggiano 5 лет назад
Родитель
Сommit
5881690949
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/Monolog/Handler/HandlerWrapper.php

+ 2 - 0
src/Monolog/Handler/HandlerWrapper.php

@@ -108,6 +108,8 @@ class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, F
     {
         if ($this->handler instanceof FormattableHandlerInterface) {
             $this->handler->setFormatter($formatter);
+
+            return $this;
         }
 
         throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);