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 21c62f083d
commit a66ba7e3e9

View File

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