Skip to content

Commit

Permalink
Fix #790 - Add check categoryIds in front of IN selection
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Feb 27, 2024
1 parent 485e947 commit 4837c86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/EventListener/CategoryFilterEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ protected function getCategories(string $tableName, string $fieldName): array
->executeQuery()
->fetchFirstColumn();

if (empty($categoryIds)) {
return [];
}

return $this->categoryRepository->findByIds(
$categoryIds,
['title' => QueryInterface::ORDER_ASCENDING]
Expand Down

0 comments on commit 4837c86

Please sign in to comment.