From a50139fa24dab6afa94ef5ff2363c551e82f67a8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 16 Nov 2021 08:34:51 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: explode(): Argument #2 ($string) must be of type string, array 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 c31757633f..0d7efbde1e 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -2077,7 +2077,7 @@ class calendar_boupdate extends calendar_bo 'data' => $event['description'] ); - foreach(explode(',',$event['category']) as $cat_id) + foreach(is_array($event['category']) ? $event['category'] : explode(',', $event['category']) as $cat_id) { $cat_string[] = stripslashes(Api\Categories::id2name($cat_id)); }