Skip to content

Commit

Permalink
Fixed SQL query for inactive categories (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Feb 23, 2024
1 parent 47bebe4 commit 4395d82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FrontendModule/NewsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function getInactiveCategories(array $customCategories = []): Collecti
}

$columns[] = $criteria->getColumns();
$values = $criteria->getValues();
$values[] = $criteria->getValues();
}

// Should not happen but you never know
Expand All @@ -232,7 +232,7 @@ protected function getInactiveCategories(array $customCategories = []): Collecti

$newsIds = Database::getInstance()
->prepare('SELECT id FROM tl_news WHERE '.implode(' AND ', array_merge(...$columns)))
->execute(array_merge(...$values))
->execute(...array_merge(...$values))
->fetchEach('id')
;

Expand Down

0 comments on commit 4395d82

Please sign in to comment.