From abcec46ea89ed351680367d0bf411b632774ca5a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 8 Nov 2021 10:55:45 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: Unsupported operand types: EGroupware\Api\DateTime + int --- calendar/inc/class.calendar_so.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index c38081cd7c..fb9fc494e6 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -1663,6 +1663,10 @@ ORDER BY cal_user_type, cal_usre_id // check if recurrence enddate was adjusted if(isset($event['recur_enddate'])) { + if (is_object($event['recur_enddate'])) + { + $event['recur_enddate'] = Api\DateTime::user2server($event['recur_enddate'], 'ts'); + } // recurrences need to be truncated if((int)$event['recur_enddate'] > 0 && ((int)$old_repeats['recur_enddate'] == 0 || (int)$old_repeats['recur_enddate'] > (int)$event['recur_enddate'])