Skip to content

Commit

Permalink
[mms] Prevent PHP error when a FETCH call is unsuccessful.
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 26, 2014
1 parent ceb3eee commit 8535b49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Expand Up @@ -2566,6 +2566,10 @@ protected function _fetch(Horde_Imap_Client_Fetch_Results $results,
if (!empty($resp->data['expungeissued'])) {
$this->noop();
}

foreach ($resp->fetch as $k => $v) {
$results->get($sequence ? $k : $v->getUid())->merge($v);
}
} catch (Horde_Imap_Client_Exception_ServerResponse $e) {
// A NO response, when coupled with a sequence FETCH, most
// likely means that messages were expunged. RFC 2180 [4.1]
Expand All @@ -2578,10 +2582,6 @@ protected function _fetch(Horde_Imap_Client_Fetch_Results $results,
// that the return value explicitly handles missing data for any
// given message.
}

foreach ($resp->fetch as $k => $v) {
$results->get($sequence ? $k : $v->getUid())->merge($v);
}
}

/**
Expand Down
2 changes: 2 additions & 0 deletions framework/Imap_Client/package.xml
Expand Up @@ -21,6 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Prevent PHP error when a FETCH call is unsuccessful.
* [mms] Relax type checking on cache driver object.
</notes>
<contents>
Expand Down Expand Up @@ -2213,6 +2214,7 @@
<date>2014-02-24</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Prevent PHP error when a FETCH call is unsuccessful.
* [mms] Relax type checking on cache driver object.
</notes>
</release>
Expand Down

0 comments on commit 8535b49

Please sign in to comment.