From d9b2f3c0cfb0f3314ed68068f5e46ca86ac50de1 Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Fri, 4 Aug 2023 11:22:14 -0600 Subject: [PATCH] Shows multiple events on the same day correctly Fixes #7803 Signed-off-by: Jon Stovell --- Sources/Subs-Calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Subs-Calendar.php b/Sources/Subs-Calendar.php index 6b8de1ae96..f4b2cdbf4a 100644 --- a/Sources/Subs-Calendar.php +++ b/Sources/Subs-Calendar.php @@ -175,7 +175,7 @@ function getEventRange($low_date, $high_date, $use_permissions = true) $start_date_string = date_format($start_object, 'Y-m-d'); $end_date_string = date_format($end_object, 'Y-m-d'); - $cal_date = ($start_object >= $low_object) ? $start_object : $low_object; + $cal_date = ($start_object >= $low_object) ? (clone $start_object) : (clone $low_object); while ($cal_date <= $end_object && $cal_date <= $high_object) { $starts_today = (date_format($cal_date, 'Y-m-d') == $start_date_string);