From 92171a7acd5ba87f45b5b88745d6eda26043ba18 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 18 Aug 2023 12:44:40 +1200 Subject: [PATCH] php8.x fatal fix --- CRM/Event/BAO/Event.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 4ba2795c04..8c7fea3c88 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1271,7 +1271,7 @@ WHERE civicrm_event.is_active = 1 * Add the custom fields OR array of participant's profile info. * * @param int $id - * @param string $name + * @param string $name eg. customPre or additionalCustomPost to denote the profile location. * @param int $cid * @param \CRM_Core_Smarty $template * @param int $participantId @@ -1443,22 +1443,15 @@ WHERE civicrm_event.is_active = 1 } } - if (count($val)) { - $template->assign($name, $val); - } - - if (count($groupTitles)) { - $template->assign($name . '_grouptitle', $groupTitles); - } + $template->assign($name, $val); + $template->assign($name . '_grouptitle', $groupTitles); //return if we only require array of participant's info. if ($returnResults) { - if (count($val)) { + if ($val) { return [$val, $groupTitles]; } - else { - return NULL; - } + return NULL; } } -- 2.25.1