summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap_generic.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index ab37902ae..411e1d396 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -1552,8 +1552,15 @@ class rcube_imap_generic
function thread($folder, $algorithm='REFERENCES', $criteria='', $encoding='US-ASCII')
{
+ $old_sel = $this->selected;
+
if (!$this->select($folder)) {
- return false;
+ return false;
+ }
+
+ // return empty result when folder is empty and we're just after SELECT
+ if ($old_sel != $folder && !$this->exists) {
+ return array(array(), array(), array());
}
$encoding = $encoding ? trim($encoding) : 'US-ASCII';