From: Michael M Slusarz Date: Tue, 7 Sep 2010 21:09:32 +0000 (-0600) Subject: Short circuit if indices list is empty X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5fbd5d18ad662a2bd353c10b7f7e92c6b55168d7;p=horde.git Short circuit if indices list is empty --- diff --git a/imp/lib/Imap/Thread.php b/imp/lib/Imap/Thread.php index aa09f910d..b7c9cd329 100644 --- a/imp/lib/Imap/Thread.php +++ b/imp/lib/Imap/Thread.php @@ -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