From 1fe8b46755d123b01b4fe545758d42f2e0440883 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 3 Oct 2019 09:30:52 +0100 Subject: [PATCH] Event::sendEmail() - Fix displaying of heading. Use same key. The message templates use this loop: ``` {foreach from=$customPost item=customPos key=j} {$customPost_grouptitle.$j} ``` Note that the keys in `$customPost` and `$customPost_grouptitle` need to match. --- CRM/Event/BAO/Event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 8f7ab1c185..4765a29b1c 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1144,8 +1144,8 @@ WHERE civicrm_event.is_active = 1 // @todo - the goal is that all params available to the message template are explicitly defined here rather than // 'in a smattering of places'. Note that leakage can happen between mailings when not explicitly defined. $customPostTitles = empty($profilePost[1]) ? NULL : []; - foreach ($postProfileID as $id) { - $customPostTitles[$id] = CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $id); + foreach ($postProfileID as $offset => $id) { + $customPostTitles[$offset] = CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $id); } $tplParams = array_merge($values, $participantParams, [ 'email' => $email, -- 2.25.1