From 3026340d8023eb56e307ac902925b873d8a0c75b Mon Sep 17 00:00:00 2001 From: eileenmcnaughton Date: Mon, 13 Jul 2015 06:33:27 +0000 Subject: [PATCH] test fix --- CRM/Contribute/Form/Contribution/Confirm.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 1e0d0e9adc..b6e9271399 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -1842,7 +1842,14 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr $result = NULL; if ($form->_values['is_monetary'] && !$form->_params['is_pay_later'] && $minimumFee > 0.0) { - $payment = $form->_paymentProcessor['object']; + // At the moment our tests are calling this form in a way that leaves 'object' empty. For + // now we compensate here. + if (empty($form->_paymentProcessor['object'])) { + $payment = Civi\Payment\System::singleton()->getByProcessor($this->_paymentProcessor); + } + else { + $payment = $form->_paymentProcessor['object']; + } if ($form->_contributeMode == 'express') { $result = $payment->doExpressCheckout($tempParams); -- 2.25.1