1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 20:57:36 +02:00

Only fail on really empty stream URL, fixes #796

This commit is contained in:
Jordi Boggiano
2016-05-26 20:27:56 +01:00
parent ba9d57a96b
commit 5e6b844653

View File

@@ -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();