Skip to content

Commit

Permalink
[BUGFIX] Fix disableOverrideDemand checks for search actions
Browse files Browse the repository at this point in the history
Resolves: #2176
  • Loading branch information
georgringer committed Nov 5, 2024
1 parent 0099ca3 commit ef840d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Controller/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public function dateMenuAction(?array $overwriteDemand = null): ResponseInterfac
$demand = $this->createDemandObjectFromSettings($this->settings);
$demand->setActionAndClass(__METHOD__, self::class);

if ($this->settings['disableOverrideDemand'] != 1 && $overwriteDemand !== null) {
if ((int)($this->settings['disableOverrideDemand'] ?? 1) !== 1 && $overwriteDemand !== null) {
$overwriteDemandTemp = $overwriteDemand;
unset($overwriteDemandTemp['year']);
unset($overwriteDemandTemp['month']);
Expand Down Expand Up @@ -492,7 +492,7 @@ public function searchFormAction(
$demand = $this->createDemandObjectFromSettings($this->settings);
$demand->setActionAndClass(__METHOD__, self::class);

if ((bool)($this->settings['disableOverrideDemand'] ?? false) && $overwriteDemand !== null) {
if ((int)($this->settings['disableOverrideDemand'] ?? 1) !== 1 && $overwriteDemand !== null) {
$demand = $this->overwriteDemandObject($demand, $overwriteDemand);
}

Expand Down Expand Up @@ -524,7 +524,7 @@ public function searchResultAction(
$demand = $this->createDemandObjectFromSettings($this->settings);
$demand->setActionAndClass(__METHOD__, self::class);

if ($this->settings['disableOverrideDemand'] != 1 && $overwriteDemand !== null) {
if ((int)($this->settings['disableOverrideDemand'] ?? 1) !== 1 && $overwriteDemand !== null) {
$demand = $this->overwriteDemandObject($demand, $overwriteDemand);
}

Expand Down

0 comments on commit ef840d3

Please sign in to comment.