Skip to content

Commit

Permalink
Suppress internal errors from imap_reopen()
Browse files Browse the repository at this point in the history
Fixes #522
  • Loading branch information
tomsommer authored and Slamdunk committed Nov 29, 2021
1 parent 2d6c3f7 commit 6546f1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ImapResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ private function initMailbox(): void
return;
}

\set_error_handler(static function (): bool {
return true;
});

\imap_reopen($this->resource, $this->mailbox->getFullEncodedName());

\restore_error_handler();

if (self::isMailboxOpen($this->mailbox, $this->resource)) {
return;
}
Expand Down

0 comments on commit 6546f1d

Please sign in to comment.