Skip to content

Commit bf1f5d6

Browse files
authored
Merge 548b6be into 6e76b35
2 parents 6e76b35 + 548b6be commit bf1f5d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Connection/Protocols/ImapProtocol.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ public function fetch($items, $from, $to = null, $uid = IMAP::ST_UID) {
585585
if ($to === null && !is_array($from) && ($uid ? $tokens[2][$uidKey] != $from : $tokens[0] != $from)) {
586586
continue;
587587
}
588-
$data = "";
589588

590589
// if we only want one item we return that one directly
591590
if (count($items) == 1) {
@@ -594,6 +593,7 @@ public function fetch($items, $from, $to = null, $uid = IMAP::ST_UID) {
594593
} elseif ($uid && $tokens[2][2] == $items[0]) {
595594
$data = $tokens[2][3];
596595
} else {
596+
$expectedResponse = 0;
597597
// maybe the server send an other field we didn't wanted
598598
$count = count($tokens[2]);
599599
// we start with 2, because 0 was already checked
@@ -602,8 +602,12 @@ public function fetch($items, $from, $to = null, $uid = IMAP::ST_UID) {
602602
continue;
603603
}
604604
$data = $tokens[2][$i + 1];
605+
$expectedResponse = 1;
605606
break;
606607
}
608+
if (!$expectedResponse) {
609+
continue;
610+
}
607611
}
608612
} else {
609613
$data = [];

0 commit comments

Comments
 (0)