Skip to content

Commit

Permalink
Merge pull request #134 from remicollet/issue-php8
Browse files Browse the repository at this point in the history
fix TypeError: fclose(): supplied resource is not a valid stream reso…
  • Loading branch information
weierophinney authored Feb 12, 2021
2 parents 8510edb + 6964db9 commit 2cd4c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Storage/Mbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ protected function openMboxFile($filename)
*/
public function close()
{
ErrorHandler::start(E_WARNING);
fclose($this->fh);
ErrorHandler::stop();
if (is_resource($this->fh)) {
fclose($this->fh);
}
$this->positions = [];
}

Expand Down

0 comments on commit 2cd4c5a

Please sign in to comment.