From b625c91b9eb817e419eac0b98fa6b27532f1730d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Mon, 15 Nov 2021 09:53:08 +0100 Subject: [PATCH] Fix contingent import crashing due to missing room type --- .../ep_products/Classes/Service/ContingentImportService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php index 7b2c2dbd..b5d0a880 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/ContingentImportService.php @@ -271,6 +271,9 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac $roomTypeBusProId = $roomType['link'] ?: $roomType['idBusPro']; $xpath = sprintf('zimmerliste/zimmer[@idbuspro="%d"]', $roomTypeBusProId); $xmlRoom = $xmlDate->xpath($xpath)[0]; + if (null === $xmlRoom) { + continue; + } $this->calculateContingent($xmlRoom, $roomType, $date, $hotelData); } $dateCount++;