From 9262d0b32a7305d48bc6d9c50ab1fe21046b85a1 Mon Sep 17 00:00:00 2001 From: pushrbx Date: Sun, 21 May 2023 20:45:29 +0100 Subject: [PATCH] fixed logic error --- app/Services/TypeSenseScoutSearchService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/TypeSenseScoutSearchService.php b/app/Services/TypeSenseScoutSearchService.php index a4c2c69..4b7c6f2 100644 --- a/app/Services/TypeSenseScoutSearchService.php +++ b/app/Services/TypeSenseScoutSearchService.php @@ -40,7 +40,7 @@ class TypeSenseScoutSearchService implements ScoutSearchService $options['typo_tokens_threshold'] = (int) env('TYPESENSE_TYPO_TOKENS_THRESHOLD', 1); // prevent `Could not parse the filter query: unbalanced `&&` operands.` error // this adds support for typesense v0.24.1 - if ($options['filter_by'] === ' && ' || $options['filter_by'] === '&&') { + if (array_key_exists('filter_by', $options) && ($options['filter_by'] === ' && ' || $options['filter_by'] === '&&')) { unset($options['filter_by']); }