fix PHP 8.0 TypeError: key(): Argument #1 ($array) must be of type array, null given

This commit is contained in:
Ralf Becker 2021-11-10 11:44:42 +01:00
parent 86e232f2f5
commit 408bcbb26b

View File

@ -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']))