From a25b603a142d4bef729b59cb8efdd9844fb5109b Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 15 Sep 2021 11:41:42 -0400 Subject: [PATCH] Ensure we don't get previously set honoree values in contribution receipts. When processing a series of recurring contributions, the honoree info from previous contributions show up in the receipts of later contributors. --- CRM/Contribute/BAO/ContributionPage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index 447f38395f..78bc58be44 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -325,6 +325,10 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio } list($values['customPost_grouptitle'], $values['customPost']) = self::getProfileNameAndFields($postID, $userID, $params['custom_post_id']); } + // Assign honoree values for the receipt. But first, stop any leaks from + // previously assigned values. + $template->assign('honoreeProfile', []); + $template->assign('honorName', NULL); if (isset($values['honor'])) { $honorValues = $values['honor']; $template->_values = ['honoree_profile_id' => $values['honoree_profile_id']]; -- 2.25.1