Quellcode durchsuchen

Only fail on really empty stream URL, fixes #796

Jordi Boggiano vor 9 Jahren
Ursprung
Commit
5e6b844653
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/Monolog/Handler/StreamHandler.php

+ 1 - 1
src/Monolog/Handler/StreamHandler.php

@@ -81,7 +81,7 @@ class StreamHandler extends AbstractProcessingHandler
     protected function write(array $record)
     {
         if (!is_resource($this->stream)) {
-            if (!$this->url) {
+            if (null === $this->url || '' === $this->url) {
                 throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
             }
             $this->createDir();