summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-02-02 16:08:18 +0100
committerAleksander Machniak <alec@alec.pl>2015-02-02 16:08:18 +0100
commite8fc8d303a30658abd70419917a1373131802e28 (patch)
tree1acb1b8514099415324e451e0bae84719defb9bb /program/lib/Roundcube
parent0a5841702fdc6e71f23b7eebd046ef715b74b544 (diff)
Fix handling of GETANNOTATION errors - return NULL on error as documented
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_imap.php8
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);
}