From 5e6b84465332b9c7596e64b35bf86aff935c2e92 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 26 May 2016 20:27:56 +0100 Subject: [PATCH] Only fail on really empty stream URL, fixes #796 --- src/Monolog/Handler/StreamHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();