File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -423,20 +423,20 @@ public function getSearchParams($term, array $options = [])
423423
424424 // Check for must filters
425425 if ($ filter_musts = Arr::get ($ options , 'filter_musts ' )) {
426- foreach (array_filter ( $ filter_musts) as $ filter =>$ value ) {
426+ foreach ($ filter_musts as $ filter =>$ value ) {
427427
428428 // TODO: This sucks...fix it. Version 2 made it so that
429429 // all tags had to be present, not just some of them
430430 if (is_array ($ value )) {
431- foreach ($ value as $ k =>$ v ) {
431+ foreach (array_filter ( $ value) as $ k =>$ v ) {
432432 $ params ['body ' ]['query ' ]['bool ' ]['must ' ][] = [
433433 'term ' => [
434434 $ filter => $ v ,
435435 ],
436436 ];
437437 }
438438 }
439- else {
439+ else if ( $ value !== '' ) {
440440 $ params ['body ' ]['query ' ]['bool ' ]['must ' ][] = [
441441 'term ' => [
442442 $ filter => $ value ,
You can’t perform that action at this time.
0 commit comments