From 5fbd5d18ad662a2bd353c10b7f7e92c6b55168d7 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 7 Sep 2010 15:09:32 -0600 Subject: [PATCH] Short circuit if indices list is empty --- imp/lib/Imap/Thread.php | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.11.0