mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +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:
@@ -46,10 +46,10 @@ class StreamHandler extends AbstractHandler
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
if (null !== $this->stream) {
|
||||
if (is_resource($this->stream)) {
|
||||
fclose($this->stream);
|
||||
$this->stream = null;
|
||||
}
|
||||
$this->stream = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user