From e8fc8d303a30658abd70419917a1373131802e28 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 2 Feb 2015 16:08:18 +0100 Subject: Fix handling of GETANNOTATION errors - return NULL on error as documented --- program/lib/Roundcube/rcube_imap.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'program/lib/Roundcube') 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); } -- cgit v1.2.3