From f8b0c7a1aa6dd6bc3fbee765e9fcb993f93ddb1a Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 23 May 2023 10:31:39 +0200 Subject: [PATCH] [BUGFIX] Correct request parameter checks --- Classes/Controller/WidgetController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/WidgetController.php b/Classes/Controller/WidgetController.php index ad7adc97..9327cbdc 100644 --- a/Classes/Controller/WidgetController.php +++ b/Classes/Controller/WidgetController.php @@ -46,7 +46,7 @@ public function categoriesAction(): ResponseInterface { $requestParameters = GeneralUtility::_GP('tx_blog_category'); $currentCategory = 0; - if (!(bool)($requestParameters['category'] ?? null)) { + if (($requestParameters['category'] ?? null) !== null) { $currentCategory = (int)$requestParameters['category']; } $categories = $this->categoryRepository->findAll(); @@ -62,7 +62,7 @@ public function tagsAction(): ResponseInterface { $requestParameters = GeneralUtility::_GP('tx_blog_tag'); $currentTag = 0; - if (!(bool)($requestParameters['tag'] ?? null)) { + if (($requestParameters['tag'] ?? null) !== null) { $currentTag = (int)$requestParameters['tag']; } $limit = (int)($this->settings['widgets']['tags']['limit'] ?? 20);