Skip to content

Commit 147a07e

Browse files
committed
[BUGFIX] Fix demand access for pages without site configuration
Related #27
1 parent 237b189 commit 147a07e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Classes/Service/RedirectDemandService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RedirectDemandService
1515
{
1616
protected array $data = [];
1717

18-
protected Demand $demand;
18+
protected ?Demand $demand = null;
1919

2020
private RedirectRepository $redirectRepository;
2121
private EventDispatcherInterface $eventDispatcher;
@@ -36,12 +36,12 @@ public function setData(array $data): void
3636
$this->data = $data;
3737
}
3838

39-
public function getDemand(): Demand
39+
public function getDemand(): ?Demand
4040
{
4141
return $this->demand;
4242
}
4343

44-
public function setDemand(Demand $demand): void
44+
public function setDemand(?Demand $demand): void
4545
{
4646
$this->demand = $demand;
4747
}
@@ -107,4 +107,4 @@ public function preparePagination(Demand $demand = null): array
107107
}
108108
return $pagination;
109109
}
110-
}
110+
}

0 commit comments

Comments
 (0)