1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

fixed resource check

This commit is contained in:
Johann Zelger
2014-04-07 17:52:05 +02:00
parent c3dd9b972b
commit a1e7f2a6fb

View File

@@ -61,7 +61,7 @@ class StreamHandler extends AbstractProcessingHandler
*/
protected function write(array $record)
{
if (null === $this->stream) {
if (!is_resource($this->stream)) {
if (!$this->url) {
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
}