fix: avoid null pointer exception
This commit is contained in:
1 parent
000c42ecba
commit
e0fffce621
1 file changed
+8
@@ -47,6 +47,14 @@ class TravelinfoController extends ActionController
|
||||
/** @var Date $date */
|
||||
$date = $this->dateRepository->findOneByCode($travelCodeDate);
|
||||
|
||||
if (null === $date) {
|
||||
$response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction(
|
||||
$GLOBALS['TYPO3_REQUEST'],
|
||||
'Termin nicht gefunden'
|
||||
);
|
||||
throw new ImmediateResponseException($response, 1731071856);
|
||||
}
|
||||
|
||||
$product = $date->getProduct();
|
||||
|
||||
if (null === $product) {
|
||||
|
||||
Reference in new issue
Block a user