From a66ba7e3e9a85165fd517cc4ca6a4f5d5e037e99 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 e6838205ab..3d9b986bc4 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -2070,7 +2070,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)); }