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);