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

This commit is contained in:
Ralf Becker 2021-10-08 14:58:27 +02:00
parent f62ff90444
commit 88f76e4bc1

View File

@ -1634,7 +1634,7 @@ class calendar_boupdate extends calendar_bo
$memberships = $GLOBALS['egw']->accounts->memberships($uid,true);
}
$memberships[] = $uid;
return array_intersect($memberships, array_keys($event['participants'])) && $this->check_perms(Acl::EDIT,0,$uid);
return array_intersect($memberships, array_keys($event['participants'] ?? [])) && $this->check_perms(Acl::EDIT,0,$uid);
}
/**