소스 검색

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

Adds return value in handler wrapper
Jordi Boggiano 5 년 전
부모
커밋
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) {
         if ($this->handler instanceof FormattableHandlerInterface) {
             $this->handler->setFormatter($formatter);
             $this->handler->setFormatter($formatter);
+
+            return $this;
         }
         }
 
 
         throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);
         throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);