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

This commit is contained in:
Ralf Becker 2021-11-13 17:12:14 +01:00
parent e95edf60ec
commit 7cd6284f0c

View File

@ -3247,7 +3247,7 @@ class calendar_uiforms extends calendar_ui
else else
{ {
// Group membership // Group membership
foreach(array_keys($event['participants']) as $id) foreach(array_keys($event['participants'] ?? []) as $id)
{ {
if($GLOBALS['egw']->accounts->get_type($id) == 'g' && in_array($uid,$GLOBALS['egw']->accounts->members($id,true))) if($GLOBALS['egw']->accounts->get_type($id) == 'g' && in_array($uid,$GLOBALS['egw']->accounts->members($id,true)))
{ {