From 4395d82476e156542f03fd4a8338cbacce48fb26 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Fri, 23 Feb 2024 08:56:37 +0100 Subject: [PATCH] Fixed SQL query for inactive categories (#256) --- src/FrontendModule/NewsModule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FrontendModule/NewsModule.php b/src/FrontendModule/NewsModule.php index 3de95d8..994a2d9 100644 --- a/src/FrontendModule/NewsModule.php +++ b/src/FrontendModule/NewsModule.php @@ -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 @@ -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') ;