File tree 1 file changed +3
-3
lines changed
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 = [])
423
423
424
424
// Check for must filters
425
425
if ($ filter_musts = Arr::get ($ options , 'filter_musts ' )) {
426
- foreach (array_filter ( $ filter_musts) as $ filter =>$ value ) {
426
+ foreach ($ filter_musts as $ filter =>$ value ) {
427
427
428
428
// TODO: This sucks...fix it. Version 2 made it so that
429
429
// all tags had to be present, not just some of them
430
430
if (is_array ($ value )) {
431
- foreach ($ value as $ k =>$ v ) {
431
+ foreach (array_filter ( $ value) as $ k =>$ v ) {
432
432
$ params ['body ' ]['query ' ]['bool ' ]['must ' ][] = [
433
433
'term ' => [
434
434
$ filter => $ v ,
435
435
],
436
436
];
437
437
}
438
438
}
439
- else {
439
+ else if ( $ value !== '' ) {
440
440
$ params ['body ' ]['query ' ]['bool ' ]['must ' ][] = [
441
441
'term ' => [
442
442
$ filter => $ value ,
You can’t perform that action at this time.
0 commit comments