Skip to content

Commit

Permalink
Merge pull request #11484 from civicrm/4.7.30-rc
Browse files Browse the repository at this point in the history
4.7.30 rc
  • Loading branch information
eileenmcnaughton authored Jan 4, 2018
2 parents f00eb59 + b2c29c4 commit f29c5bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CRM/Contribute/Form/ContributionBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ public function preProcess() {
$this->_fields = $this->get('fields');
$this->_bltID = $this->get('bltID');
$this->_paymentProcessor = $this->get('paymentProcessor');
if (!$this->_paymentProcessor) {
$this->_paymentProcessor = array('object' => Civi\Payment\System::singleton()->getById(0));
}

$this->_priceSetId = $this->get('priceSetId');
$this->_priceSet = $this->get('priceSet');

Expand Down Expand Up @@ -581,9 +579,10 @@ public function assignToTemplate() {

// The concept of contributeMode is deprecated.
// The payment processor object can provide info about the fields it shows.
if ($isMonetary) {
if ($isMonetary && is_a($this->_paymentProcessor['object'], 'CRM_Core_Payment')) {
/** @var $paymentProcessorObject \CRM_Core_Payment */
$paymentProcessorObject = $this->_paymentProcessor['object'];

$paymentFields = $paymentProcessorObject->getPaymentFormFields();
foreach ($paymentFields as $index => $paymentField) {
if (!isset($this->_params[$paymentField])) {
Expand Down

0 comments on commit f29c5bd

Please sign in to comment.