From 0da5d651f88a4acc49c4d51f567999ecf8b497b0 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 13 Dec 2023 09:59:41 +0200 Subject: [PATCH] fix PHP TypeError count() Argument #1 ($value) must be of type Countable|array, string given --- infolog/inc/class.infolog_so.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 0ba3c37515..9a5edbe758 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -688,8 +688,11 @@ class infolog_so // update attendees/delegates if (array_key_exists('info_responsible', $values) || array_key_exists('info_cc', $values)) { - $users = empty($values['info_responsible']) ? array() : - array_combine($values['info_responsible'], array_fill(0, count($values['info_responsible']), null)); + if (!is_array($values['info_responsible'])) + { + $values['info_responsible'] = empty($values['info_responsible']) ? [] : explode(',', $values['info_responsible']); + } + $users = array_combine($values['info_responsible'], array_fill(0, count($values['info_responsible']), null)); foreach(!empty($values['info_cc']) ? explode(',', $values['info_cc']) : array() as $email) {