Skip to content

Commit 8949ecc

Browse files
committed
Return type fixed to be consistent and prevent type confusion
1 parent a09a0f1 commit 8949ecc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Connection/Protocols/LegacyProtocol.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,11 @@ public function done() {
559559
* @return array message ids
560560
*/
561561
public function search(array $params, $uid = IMAP::ST_UID) {
562-
return \imap_search($this->stream, $params[0], $uid ? IMAP::ST_UID : IMAP::NIL);
562+
$result = \imap_search($this->stream, $params[0], $uid ? IMAP::ST_UID : IMAP::NIL);
563+
if ($result === false) {
564+
return [];
565+
}
566+
return $result;
563567
}
564568

565569
/**

0 commit comments

Comments
 (0)