summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-07 07:53:01 +0000
committeralecpl <alec@alec.pl>2009-09-07 07:53:01 +0000
commit4a63f1efaff83dd03e663ed1a432a15dc0100be3 (patch)
tree88fe563cb09033b33fb51b5fbf9d23fc99e427ec /program/include
parente077870affc064e958d9f3077b1e3373634e24b7 (diff)
- Fix roundcube hangs on empty inbox with bincimapd (#1486093)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 3d8cb84b8..f1729311b 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2228,8 +2228,10 @@ class rcube_imap
$msg_count = $this->_messagecount($mailbox);
$cache_count = count($cache_index);
- // console("Cache check: $msg_count !== ".count($cache_index));
-
+ // empty mailbox
+ if (!$msg_count)
+ return $cache_count ? -2 : 1;
+
if ($cache_count==$msg_count) {
if ($this->skip_deleted) {
$h_index = iil_C_FetchHeaderIndex($this->conn, $mailbox, "1:*", 'UID', $this->skip_deleted);