Explorar o código

Handle prematurely closed streams in StreamLogger.

Justin Hileman %!s(int64=13) %!d(string=hai) anos
pai
achega
d1fb1d86c5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Mustache/Logger/StreamLogger.php

+ 1 - 1
src/Mustache/Logger/StreamLogger.php

@@ -47,7 +47,7 @@ class StreamLogger extends Mustache_Logger_AbstractLogger
      */
     protected function write($level, $message, array $context = array())
     {
-        if ($this->stream === null) {
+        if (!is_resource($this->stream)) {
             if (!isset($this->url)) {
                 throw new LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
             }