From 061417fa2acc79ed0a855859d6f771606a89ac02 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 1 Sep 2023 13:44:33 +1200 Subject: [PATCH] Use internal property rather than undefined _type --- CRM/Core/Payment/ProcessorForm.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CRM/Core/Payment/ProcessorForm.php b/CRM/Core/Payment/ProcessorForm.php index e62763f7d3..381090f7aa 100644 --- a/CRM/Core/Payment/ProcessorForm.php +++ b/CRM/Core/Payment/ProcessorForm.php @@ -31,16 +31,10 @@ class CRM_Core_Payment_ProcessorForm { * @throws Exception */ public static function preProcess(&$form, $type = NULL, $mode = NULL) { + $type = $type ?: CRM_Utils_Request::retrieve('type', 'String', $form); if ($type) { - $form->_type = $type; - } - else { - $form->_type = CRM_Utils_Request::retrieve('type', 'String', $form); - } - - if ($form->_type) { // @todo not sure when this would be true. Never passed in. - $form->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($form->_type, $form->_mode); + $form->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($type, $form->_mode); } if (empty($form->_paymentProcessor)) { -- 2.25.1