From c2358f41d2b65472eb5a6b906f8330188fb401ac Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 14 Apr 2016 16:04:57 +1200 Subject: [PATCH] Fix variable leak in attempt to fix test issue --- CRM/Contribute/BAO/Contribution.php | 2 +- CRM/Contribute/BAO/ContributionPage.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 6eaca457d1..f43320be77 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2502,7 +2502,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac $membership_status = CRM_Member_PseudoConstant::membershipStatus($membership->status_id, NULL, 'label'); $template->assign('mem_status', $membership_status); if ($membership_status == 'Pending' && $membership->is_pay_later == 1) { - $template->assign('is_pay_later', 1); + $values['is_pay_later'] = 1; } // if separate payment there are two contributions recorded and the diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index 50d9722610..7a40cdef41 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -167,6 +167,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio 'membership_assign', 'amount', 'receipt_date', + 'is_pay_later', ); foreach ($valuesRequiredForTemplate as $valueRequiredForTemplate) { @@ -381,6 +382,7 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio 'useForMember' => $values['useForMember'], 'membership_assign' => $values['membership_assign'], 'amount' => $values['amount'], + 'is_pay_later' => $values['is_pay_later'], 'receipt_date' => !$values['receipt_date'] ?: date('YmdHis', strtotime($values['receipt_date'])), ); -- 2.25.1