From 4f78f557bbc68e3202c4ae1a05fb66b5de8d4723 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 18 Nov 2021 17:35:26 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: calendar_tracking::track(): Argument #2 ($old) must be of type ?array, bool given --- calendar/inc/class.calendar_boupdate.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 0d7efbde1e..5b0d503005 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1591,7 +1591,7 @@ class calendar_boupdate extends calendar_bo $save_event[$ts] = $save_event[$ts]->format('ts'); } } - $tracking->track($save_event, $old_event); + $tracking->track($save_event, $old_event ?: null); return $cal_id; } @@ -1832,7 +1832,7 @@ class calendar_boupdate extends calendar_bo if (($event = $this->read($cal_id, $recur_date, $ignore_acl, 'server'))) { $tracking = new calendar_tracking($this); - $tracking->track($event, $old_event); + $tracking->track($event, $old_event ?: null); } // notify the link-class about the update, as other apps may be subscribed to it Link::notify_update('calendar', $cal_id, $event, "update");