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

Add try/catch block around call to close method in the AbstractHandler destructor.

Mark Perkins 14 лет назад
Родитель
Сommit
5055102e88
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      src/Monolog/Handler/AbstractHandler.php

+ 5 - 1
src/Monolog/Handler/AbstractHandler.php

@@ -154,7 +154,11 @@ abstract class AbstractHandler implements HandlerInterface
 
     public function __destruct()
     {
-        $this->close();
+        try {
+            $this->close();    
+        } catch( \Exception $e ) {
+            // do nothing
+        }
     }
 
     /**