Fix variable leak in attempt to fix test issue
authoreileen <emcnaughton@wikimedia.org>
Thu, 14 Apr 2016 04:04:57 +0000 (16:04 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 14 Apr 2016 04:06:50 +0000 (16:06 +1200)
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/ContributionPage.php

index 6eaca457d1ee83b1c0e8b3b1f8ab471579bae665..f43320be7758fe0ed9c80ae8de8a5b3147eef154 100644 (file)
@@ -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
index 50d9722610bca55bb580546358fa8d7299e08640..7a40cdef41a584db25c49b86d8647d8c54d60047 100644 (file)
@@ -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'])),
       );