Short circuit if indices list is empty
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 21:09:32 +0000 (15:09 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 23:37:59 +0000 (17:37 -0600)
imp/lib/Imap/Thread.php

index aa09f91..b7c9cd3 100644 (file)
@@ -55,6 +55,10 @@ class IMP_Imap_Thread
         $thread_level = $tree = array();
         $t = &$this->_thread;
 
+        if (empty($indices)) {
+            return $tree;
+        }
+
         $indices = array_intersect($t->messageList($sortdir), $indices);
 
         /* If starting in the middle of a thread, the threadLevel tree needs