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-20800 fix fatal error up updating paypal contributions #10986

Merged
merged 2 commits into from
Nov 29, 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
1 change: 1 addition & 0 deletions CRM/Contribute/Form/UpdateSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function preProcess() {
catch (CRM_Core_Exception $e) {
CRM_Core_Error::statusBounce(ts('There is no valid processor for this subscription so it cannot be edited.'));
}
$this->_paymentProcessorObj = $this->_paymentProcessor['object'];
Copy link
Contributor

Choose a reason for hiding this comment

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

@monishdeb @eileenmcnaughton I've just run into this line on master and it seems to be breaking the "update subscription" functionality for me. I'm using the smartdebit extension and I get a php crash because $this->_paymentProcessorObj is not an object. Running through a debugger the "object" is actually $this->_paymentProcessor and there is no 'object' array element. Do either of you understand what this line is supposed to do - is it something that needs updating in my smartdebit extension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

arg -does this work?

eileenmcnaughton@3bc67dd

The assigns to the tpl seem no longer required - we call the payment processor to determine what fields can be edited & what text should be rendered

$this->editableScheduleFields = $this->_paymentProcessorObj->getEditableRecurringScheduleFields();

$changeHelpText = $this->_paymentProcessorObj->getRecurringScheduleUpdateHelpText();

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it does! Well I tested UpdateSubscription at least and that seems to work fine with that additional patch

$this->_subscriptionDetails = CRM_Contribute_BAO_ContributionRecur::getSubscriptionDetails($this->contributionRecurID);
}

Expand Down