diff --git a/packages/ep_products/Classes/Service/DateService.php b/packages/ep_products/Classes/Service/DateService.php index 52f4bf1..0746a7f 100644 --- a/packages/ep_products/Classes/Service/DateService.php +++ b/packages/ep_products/Classes/Service/DateService.php @@ -117,10 +117,10 @@ class DateService implements SingletonInterface /** @var Product $product */ $product = $resolvedOptions['product']; $hotel = $resolvedOptions['hotel']; - $filterSettings = $resolvedOptions['filterSettings']; - $date = $resolvedOptions['date']; + $filterSettings = $resolvedOptions['filterSettings'] ?? null; + $date = $resolvedOptions['date'] ?? null; $myEpUrl = $resolvedOptions['myEpUrl']; - $paCode = $resolvedOptions['paCode']; + $paCode = $resolvedOptions['paCode'] ?? null; if ($filterSettings === null) { $filterSettings = $this->filterService->getNormalizedFilterSettings(); @@ -160,7 +160,7 @@ class DateService implements SingletonInterface /** @var Product $product */ $product = $resolvedOptions['product']; $hotel = $resolvedOptions['hotel']; - $filterSettings = $resolvedOptions['filterSettings']; + $filterSettings = $resolvedOptions['filterSettings'] ?? null; if ($filterSettings === null) { $filterSettings = $this->filterService->getNormalizedFilterSettings(); @@ -204,11 +204,11 @@ class DateService implements SingletonInterface $priceTableData = $resolvedOptions['priceTableData']; $myEpUrl = $resolvedOptions['myEpUrl']; - $paCode = $resolvedOptions['paCode']; - $nonBookableDateUids = $resolvedOptions['nonBookableDateUids']; + $paCode = $resolvedOptions['paCode'] ?? null; + $nonBookableDateUids = $resolvedOptions['nonBookableDateUids'] ?? []; foreach ($priceTableData as $row) { - $showBookingButton = $resolvedOptions['showBookingButton'] && !in_array($row['dateBusProId'], $nonBookableDateUids); + $showBookingButton = ($resolvedOptions['showBookingButton'] ?? null) && !in_array($row['dateBusProId'], $nonBookableDateUids); $dateStart = new \DateTime($row['dateStart']); $dateEnd = new \DateTime($row['dateEnd']); @@ -290,12 +290,12 @@ class DateService implements SingletonInterface $dateTableData = $resolvedOptions['dateTableData']; $myEpUrl = $resolvedOptions['myEpUrl']; - $paCode = $resolvedOptions['paCode']; - $nonBookableDateUids = $resolvedOptions['nonBookableDateUids']; + $paCode = $resolvedOptions['paCode'] ?? null; + $nonBookableDateUids = $resolvedOptions['nonBookableDateUids'] ?? []; foreach ($dateTableData as $row) { // Default booking button status is determined by the product - $showBookingButton = $resolvedOptions['showBookingButton']; + $showBookingButton = ($resolvedOptions['showBookingButton'] ?? null); // Check if booking button is disabled for this date if (true === in_array($row['dateBusProId'], $nonBookableDateUids)) { $showBookingButton = false; @@ -349,7 +349,7 @@ class DateService implements SingletonInterface $priceTableData = $resolvedOptions['priceTableData']; $maxPax = $resolvedOptions['maxPax']; $myEpUrl = $resolvedOptions['myEpUrl']; - $paCode = $resolvedOptions['paCode']; + $paCode = $resolvedOptions['paCode'] ?? null; $priceTable = [ Hotel::CATEGORY_STANDARD => [],