Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21436 - Fix fatal error on pay later #11286

Merged
merged 2 commits into from
Nov 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CRM/Contribute/Form/ContributionBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function preProcess() {
}

if ($isMonetary &&
(!$isPayLater || !empty($this->_values['payment_processor']))
($isPayLater || !empty($this->_values['payment_processor']))
) {
$this->_paymentProcessorIDs = explode(
CRM_Core_DAO::VALUE_SEPARATOR,
Expand Down Expand Up @@ -580,7 +580,7 @@ public function assignToTemplate() {

// The concept of contributeMode is deprecated.
// The payment processor object can provide info about the fields it shows.
if ($assignCCInfo) {
if ($assignCCInfo && $this->_paymentProcessor) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed here for the fix, added just to be safe.

/** @var $paymentProcessorObject \CRM_Core_Payment */
$paymentProcessorObject = $this->_paymentProcessor['object'];
$paymentFields = $paymentProcessorObject->getPaymentFormFields();
Expand Down