Aleksander Machniak
2015-02-02 2646758314b09c46aecd028a45be4c6e5ca4251b
Fix handling of GETANNOTATION errors - return NULL on error as documented
1 files modified
8 ■■■■ changed files
program/lib/Roundcube/rcube_imap.php 8 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php
@@ -3681,7 +3681,13 @@
            // @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);
                    }