fix PHP 8.0 TypeError: explode(): Argument #2 ($string) must be of type string, array given

This commit is contained in:
Ralf Becker 2021-11-16 08:34:51 +01:00
parent 9409649684
commit a50139fa24

View File

@ -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));
}