diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 4ba2795c044d..8c7fea3c880c 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1271,7 +1271,7 @@ public static function sendMail($contactID, $values, $participantId, $isTest = F * 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 @@ public static function buildCustomDisplay( } } - 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; } }