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 fbfe937524
commit 1cfb7a8c6a

View File

@ -1627,7 +1627,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);
}
/**