diff --git a/src/Monolog/Handler/StreamHandler.php b/src/Monolog/Handler/StreamHandler.php index 139356c0..ccf4a979 100644 --- a/src/Monolog/Handler/StreamHandler.php +++ b/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();