From c3fb7eda8e6de1b4612b34ee1db364ce8386418b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 11 Oct 2021 13:19:46 +0200 Subject: [PATCH] fix PHP 8.0 TypeError: array_keys(): Argument #1 ($array) must be of type array, null given --- calendar/inc/class.calendar_uiforms.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 7089a49048..3b95d480f0 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -2181,7 +2181,7 @@ class calendar_uiforms extends calendar_ui } $user_and_memberships = $GLOBALS['egw']->accounts->memberships($user, true); $user_and_memberships[] = $user; - if (!array_intersect(array_keys($event['participants']), $user_and_memberships)) + if (!array_intersect(array_keys($event['participants'] ?? []), $user_and_memberships)) { $event['error'] .= ($event['error'] ? "\n" : '').lang('You are not invited to that event!'); if ($event['id'])