SearchService.php: adjust wrong array_values

This commit is contained in:
Zankaria 2025-07-24 00:25:28 +02:00
parent 00a4435a61
commit a6d4772db0

View file

@ -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 [];