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 ed9b735456
commit 7b042f7259

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