Skip to content

Commit

Permalink
fix TypeError: fclose(): supplied resource is not a valid stream reso…
Browse files Browse the repository at this point in the history
…urce
  • Loading branch information
remicollet committed Jan 26, 2021
1 parent 3fb4c61 commit b5e3861
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Storage/Mbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ protected function openMboxFile($filename)
public function close()
{
ErrorHandler::start(E_WARNING);
fclose($this->fh);
if (is_resource($this->fh)) {
fclose($this->fh);
}
ErrorHandler::stop();
$this->positions = [];
}
Expand Down

0 comments on commit b5e3861

Please sign in to comment.