Fix handling of GETANNOTATION errors - return NULL on error as documented

release-1.0
Aleksander Machniak 9 years ago
parent 0ec46f3d40
commit 2646758314

@ -3681,7 +3681,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);
}

Loading…
Cancel
Save