1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

fixed StreamHandler close

I encounted the case $this->stream = 0 when close method was called,
I think the caller condition may be wrong in this case.
But stronger check for the $this->stream parameter makes sense I think.
This commit is contained in:
hidenorigoto
2011-04-17 12:27:42 +09:00
parent ea466fa848
commit 3b54f13e72

View File

@@ -46,10 +46,10 @@ class StreamHandler extends AbstractHandler
*/ */
public function close() public function close()
{ {
if (null !== $this->stream) { if (is_resource($this->stream)) {
fclose($this->stream); fclose($this->stream);
$this->stream = null;
} }
$this->stream = null;
} }
/** /**