From 86f262fc7f5e48d3554c20978f07f9cadd4a4f6b Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 4 May 2010 03:51:21 -0600 Subject: [PATCH] Don't add empty mailbox arrays --- imp/lib/Indices.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/imp/lib/Indices.php b/imp/lib/Indices.php index 69d601e92..8609be485 100644 --- a/imp/lib/Indices.php +++ b/imp/lib/Indices.php @@ -100,9 +100,14 @@ class IMP_Indices implements Iterator case 2: $secondarg = func_get_arg(1); - $indices = array( - func_get_arg(0) => (is_array($secondarg) ? array_keys(array_flip($secondarg)) : array($secondarg)) - ); + $secondarg = is_array($secondarg) + ? array_keys(array_flip($secondarg)) + : array($secondarg); + if (!empty($secondarg)) { + $indices = array( + func_get_arg(0) => $secondarg + ); + } break; } -- 2.11.0