diff --git a/src/View/Calendar.php b/src/View/Calendar.php index 59bc9f58e..d6f9633a5 100644 --- a/src/View/Calendar.php +++ b/src/View/Calendar.php @@ -352,6 +352,7 @@ public static function getCalendarDataArray( $item, $location, string $startDate $endDate = new Day( $endDateString ); $advanceBookingDays = null; $lastBookableDate = null; + $firstBookableDay = null; $bookableTimeframes = \CommonsBooking\Repository\Timeframe::getBookableForCurrentUser( [ $location ], [ $item ], @@ -363,7 +364,7 @@ public static function getCalendarDataArray( $item, $location, string $startDate if ( count( $bookableTimeframes ) ) { $closestBookableTimeframe = self::getClosestBookableTimeFrameForToday( $bookableTimeframes ); $advanceBookingDays = intval( $closestBookableTimeframe->getFieldValue( 'timeframe-advance-booking-days' ) ); - $firstBookableDay = $closestBookableTimeframe->getFirstBookableDay(); + $firstBookableDay = $closestBookableTimeframe->getFirstBookableDay(); // Only if passed daterange must not be kept if ( ! $keepDaterange ) {