mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Fixed an error when close() is called with an invalid resource.
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user