Skip to content

Commit

Permalink
Suppress internal errors from imap_reopen() (#524)
Browse files Browse the repository at this point in the history
Fixes #522
  • Loading branch information
tomsommer authored Nov 30, 2021
1 parent 2d6c3f7 commit 1eee4d7
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 1eee4d7

Please sign in to comment.