From 3534ed9040c837d295964d38258ad472881f052c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2021 13:00:59 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: calendar_tracking::track(): Argument #1 ($data) must be of type array, null given --- calendar/inc/class.calendar_boupdate.inc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 320c409d28..fb664d3426 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1829,12 +1829,13 @@ class calendar_boupdate extends calendar_bo } // Update history - $event = $this->read($cal_id, $recur_date, $ignore_acl, 'server'); - $tracking = new calendar_tracking($this); - $tracking->track($event, $old_event); - + if (($event = $this->read($cal_id, $recur_date, $ignore_acl, 'server'))) + { + $tracking = new calendar_tracking($this); + $tracking->track($event, $old_event); + } // notify the link-class about the update, as other apps may be subscribed to it - Link::notify_update('calendar',$event['id'],$event,"update"); + Link::notify_update('calendar', $cal_id, $event, "update"); } return $Ok; }