diff --git a/inc/Service/SearchService.php b/inc/Service/SearchService.php index affca81c..e542e41a 100644 --- a/inc/Service/SearchService.php +++ b/inc/Service/SearchService.php @@ -384,8 +384,8 @@ class SearchService { $flags = []; if (!empty($filters->flag) && !empty($this->flag_map)) { // A double array_values is necessary in order to re-index the array, otherwise it's left with random indexes. - $reverse_flags = \array_values(\array_values($this->flag_map)); - $flags = $this->matchStrings($reverse_flags, $filters->flag); + $reverse_flags = \array_values($this->flag_map); + $flags = \array_values($this->matchStrings($reverse_flags, $filters->flag)); if (empty($flags)) { // The query doesn't match any flags so it will always fail anyway. return [];