diff --git a/api/src/Storage/Base.php b/api/src/Storage/Base.php index 072d3d2de7..91e683cc6d 100644 --- a/api/src/Storage/Base.php +++ b/api/src/Storage/Base.php @@ -1123,7 +1123,7 @@ class Base $criteria[$col] = substr($criteria[$col],1); $negate = true; } - foreach(explode(' ',$criteria[$col]) as $crit) + foreach((is_array($criteria[$col]) ? $criteria[$col] : explode(' ',$criteria[$col])) as $crit) { $query[] = ($negate ? ' ('.$table_name.$db_col.' IS NULL OR ' : '').$table_name.$db_col.$cmp_op. $this->db->quote($wildcard.str_replace(array('%','_','*','?'),array('\\%','\\_','%','_'),$crit).$wildcard).