1
0
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:
Christophe Coevoet 2011-03-18 19:44:14 +01:00
parent 019ebad67a
commit fb503eebf2

View File

@ -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.');
}
}