diff options
author | Aleksander Machniak <alec@alec.pl> | 2015-02-02 16:08:18 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2015-02-02 16:08:18 +0100 |
commit | e8fc8d303a30658abd70419917a1373131802e28 (patch) | |
tree | 1acb1b8514099415324e451e0bae84719defb9bb | |
parent | 0a5841702fdc6e71f23b7eebd046ef715b74b544 (diff) |
Fix handling of GETANNOTATION errors - return NULL on error as documented
-rw-r--r-- | program/lib/Roundcube/rcube_imap.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index a1fd87442..d17b33f6e 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -3951,7 +3951,13 @@ class rcube_imap extends rcube_storage // @TODO: Honor MAXSIZE and DEPTH options foreach ($queries as $attrib => $entry) { - if ($result = $this->conn->getAnnotation($folder, $entry, $attrib)) { + $result = $this->conn->getAnnotation($folder, $entry, $attrib); + + // an error, invalidate any previous getAnnotation() results + if (!is_array($result)) { + return null; + } + else { foreach ($result as $fldr => $data) { $res[$fldr] = array_merge((array) $res[$fldr], $data); } |