File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,7 @@ public static function open(
721721 */
722722 public static function ping ($ imap_stream ): bool
723723 {
724- return \is_resource ($ imap_stream ) && \imap_ping ($ imap_stream );
724+ return ( \is_resource ($ imap_stream) || $ imap_stream instanceof \ IMAP \Connection ) && \imap_ping ($ imap_stream );
725725 }
726726
727727 /**
Original file line number Diff line number Diff line change @@ -476,7 +476,7 @@ public function getImapStream(bool $forceConnection = true)
476476
477477 public function hasImapStream (): bool
478478 {
479- return \is_resource ($ this ->imapStream ) && \imap_ping ($ this ->imapStream );
479+ return ( \is_resource ($ this ->imapStream ) || $ this -> imapStream instanceof \ IMAP \Connection ) && \imap_ping ($ this ->imapStream );
480480 }
481481
482482 /**
You can’t perform that action at this time.
0 commit comments