Create $aCriteria to prevent a notice later on if there is nothing in it
[squirrelmail.git] / functions / imap_asearch.php
index 1f3176b79f61c97d2c58adf663ae6914501f780b..0db279c0a298557219e86a1cd654a2b9db2a0b92 100644 (file)
@@ -436,6 +436,7 @@ function sqimap_asearch($imapConnection, &$mailbox_array, &$biop_array, &$unop_a
                 $search_string = '';
             }
             if (isset($where_array[$cur_crit]) && empty($exclude_array[$cur_crit])) {
+                $aCriteria = array();
                 for ($crit = $cur_crit; $crit < count($where_array); $crit++) {
                     $criteria = trim(sqimap_asearch_build_criteria($where_array[$crit], $what_array[$crit], $search_charset));
                     if (!empty($criteria) && empty($exclude_array[$crit])) {