From dd01a7505601164612d8c8c78f41a15cb590b7ab Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Tue, 8 Oct 2019 11:57:45 +0200 Subject: [PATCH] Fix typos and remove unused variables --- CRM/Event/Form/Registration.php | 1 - CRM/Event/Form/Registration/Confirm.php | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 1054b83b49..a20158d2a3 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -701,7 +701,6 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { */ public function confirmPostProcess($contactID = NULL, $contribution = NULL) { // add/update contact information - $fields = array(); unset($this->_params['note']); //to avoid conflict overwrite $this->_params diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 6abb931883..468b53ee93 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -465,7 +465,6 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $payment = $registerByID = $primaryCurrencyID = $contribution = NULL; $paymentObjError = ts('The system did not record payment details for this payment and so could not process the transaction. Please report this error to the site administrator.'); - $this->participantIDS = []; $fields = []; foreach ($params as $key => $value) { CRM_Event_Form_Registration_Confirm::fixLocationFields($value, $fields, $this); @@ -1189,13 +1188,13 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } //get email primary first if exist - $subscribtionEmail = ['email' => CRM_Utils_Array::value('email-Primary', $params)]; - if (!$subscribtionEmail['email']) { - $subscribtionEmail['email'] = CRM_Utils_Array::value("email-{$form->_bltID}", $params); + $subscriptionEmail = ['email' => CRM_Utils_Array::value('email-Primary', $params)]; + if (!$subscriptionEmail['email']) { + $subscriptionEmail['email'] = CRM_Utils_Array::value("email-{$form->_bltID}", $params); } // subscribing contact to groups - if (!empty($subscribeGroupIds) && $subscribtionEmail['email']) { - CRM_Mailing_Event_BAO_Subscribe::commonSubscribe($subscribeGroupIds, $subscribtionEmail, $contactID); + if (!empty($subscribeGroupIds) && $subscriptionEmail['email']) { + CRM_Mailing_Event_BAO_Subscribe::commonSubscribe($subscribeGroupIds, $subscriptionEmail, $contactID); } return $contactID; -- 2.25.1