From 9b32bbe3f884a280963288971e749559932e45a1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 16 Nov 2021 08:10:39 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given --- calendar/inc/class.calendar_boupdate.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 4e5c9187de..e6838205ab 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -638,7 +638,7 @@ class calendar_boupdate extends calendar_bo $msg_is_response = $msg_type == MSG_REJECTED || $msg_type == MSG_ACCEPTED || $msg_type == MSG_TENTATIVE || $msg_type == MSG_DELEGATED; // Check if user is not participating, and does not want notifications - if($msg_is_response && !$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants'])) + if ($msg_is_response && !$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants'] ?? [])) { return false; }