From 408bcbb26b45b2de9c7b49c84195db0b93e32be5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2021 11:44:42 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: key(): Argument #1 ($array) must be of type array, null given --- calendar/inc/class.calendar_uiforms.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index c1863bc176..659b2a4482 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -2192,7 +2192,7 @@ class calendar_uiforms extends calendar_ui break; case 'cancel': // first participant is the (external) organizer (our iCal parser adds owner first!) - $parts = $event['participants']; + $parts = $event['participants'] ?? []; unset($parts[$existing_event['owner']]); $event['ical_sender_uid'] = key($parts); if (empty($existing_event['id']) || !$this->bo->check_perms(Acl::DELETE, $existing_event['id']))