Skip to content

Commit

Permalink
[BUGFIX] Correct request parameter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed May 23, 2023
1 parent da26ea3 commit f8b0c7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Controller/WidgetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit f8b0c7a

Please sign in to comment.