From 438c377205e07fe5505161d3307620927601144f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 10 Jul 2015 09:26:59 +1200 Subject: [PATCH] CRM-16803 QA fixes --- CRM/Member/Form.php | 6 +++--- CRM/Member/Form/MembershipRenewal.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index 6f03adf305..6bdd3c62e8 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -240,12 +240,12 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { 'contact_id' => $paymentParams['contactID'], 'amount' => $paymentParams['total_amount'], 'payment_processor_id' => $paymentParams['payment_processor_id'], - 'campaign_id' => $paymentParams['campaign_id'], + 'campaign_id' => CRM_Utils_Array::value('campaign_id', $paymentParams), 'financial_type_id' => $paymentParams['financial_type_id'], - 'is_email_receipt' => $paymentParams['is_email_receipt'], + 'is_email_receipt' => CRM_Utils_Array::value('is_email_receipt', $paymentParams), // This is not great as it could also be direct debit - but is consistent with elsewhere & all need fixing. 'payment_instrument_id' => 1, - 'invoice_id' => $paymentParams['invoiceID '], + 'invoice_id' => CRM_Utils_Array::value('invoiceID ', $paymentParams), ); $mapping = array( diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 0504a0d637..7a1c5c7a8e 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -598,7 +598,7 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; $payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this); - if ($paymentParams['auto_renew']) { + if (!empty($paymentParams['auto_renew'])) { $contributionRecurParams = $this->processRecurringContribution($paymentParams); $paymentParams = array_merge($paymentParams, $contributionRecurParams); } -- 2.25.1