mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-24 06:52:34 +01:00
Fixed an error when close() is called with an invalid resource.
This commit is contained in:
parent
019ebad67a
commit
fb503eebf2
@ -44,6 +44,7 @@ class StreamHandler extends AbstractHandler
|
||||
}
|
||||
$this->stream = fopen($this->url, 'a');
|
||||
if (!is_resource($this->stream)) {
|
||||
$this->stream = null;
|
||||
throw new \UnexpectedValueException('The stream could not be opened, "'.$this->url.'" may be an invalid url.');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user