From 35f86af2ba308154847c210a6c82272893c8a2ee Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 31 Jan 2020 16:58:59 +1300 Subject: [PATCH] [REF] Pass params into function rather than this weird check for whether params exists. This function used to be shared with the online form & hence this form had to work to make itself 'look' like the other form. It is now free to be it's own form --- CRM/Event/Form/Participant.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 929a130879..819e95fc81 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1211,7 +1211,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment //CRM-15372 patch to fix fee amount replacing amount $this->_params['fee_amount'] = $this->_params['amount']; - $participants[] = $this->addParticipant($this, $contactID); + $participants[] = $this->addParticipant($this, $this->_params, $contactID); //add custom data for participant CRM_Core_BAO_CustomValueTable::postProcess($this->_params, @@ -2083,11 +2083,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment * @return \CRM_Event_BAO_Participant * @throws \CiviCRM_API3_Exception */ - protected function addParticipant(&$form, $contactID) { - if (empty($form->_params)) { - return NULL; - } - $params = $form->_params; + protected function addParticipant(&$form, $params, $contactID) { $transaction = new CRM_Core_Transaction(); // handle register date CRM-4320 -- 2.25.1