Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.8
-
Fix Version/s: 4.6.9
-
Component/s: CiviContribute
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
When you receive a receipt for a recurring contribution, it contains text that says:
You can update billing details for this recurring contribution by visiting this web page.
"visiting this web page" is a link in the format of:
https://example.org/civicrm-base-page/?page=CiviCRM&q=civicrm/contribute/updatebilling&reset=1&coid=6542&cs=<checksum>
However, clicking that links leads to a white screen. Apache logs show:
[Fri Aug 28 11:45:25 2015] [error] [client 123.34.56.56] PHP Fatal error: Cannot use object of type CRM_Core_Payment_PayPalImpl as array in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/Form.php on line 246
I threw a backtrace call in right before that, which yielded:
{{backTrace
#0 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/Form.php(246): CRM_Core_Error::backtrace()
#1 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/Form.php(59): CRM_Core_Payment_Form::getPaymentFields(Object(CRM_Core_Payment_PayPalImpl))
#2 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/Form.php(306): CRM_Core_Payment_Form::setPaymentFieldsByProcessor(Object(CRM_Contribute_Form_UpdateBilling), Object(CRM_Core_Payment_PayPalImpl), FALSE, TRUE)
#3 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/UpdateBilling.php(216): CRM_Core_Payment_Form::buildPaymentForm(Object(CRM_Contribute_Form_UpdateBilling), Object(CRM_Core_Payment_PayPalImpl), TRUE, TRUE)
#4 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(476): CRM_Contribute_Form_UpdateBilling->buildQuickForm()
#5 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM_Core_Form->buildForm()
#6 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_UpdateBilling), "display")
#7 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_UpdateBilling), "display")
#8 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("display")
#9 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
#10 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contribute_Form_UpdateBilling", "Update Billing Details", NULL)
#11 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
#12 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#13 /var/www/wordpress/wp-content/plugins/civicrm/civicrm.php(1189): CRM_Core_Invoke::invoke((Array:3))
#14 /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.basepage.php(134): CiviCRM_For_WordPress->invoke()
#15 [internal function](): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#16 /var/www/wordpress/wp-includes/plugin.php(579): call_user_func_array((Array:2), (Array:1))
#17 /var/www/wordpress/wp-includes/class-wp.php(633): do_action_ref_array("wp", (Array:1))
#18 /var/www/wordpress/wp-includes/functions.php(886): WP->main("")
#19 /var/www/wordpress/wp-blog-header.php(14): wp()
#20 /var/www/wordpress/index.php(17): require("/var/www/wordpress/wp-blog-header.php")
#21
}}
After some investigation, I saw that CRM_Contribute_Form_UpdateBilling::buildQuickForm is passing an object as the second parameter to CRM_Core_Payment_Form::buildPaymentForm, which states that it accepts an array as its second parameter.
My PR is a one-line fix, which works for my client, but hopefully someone else can take a quick look and ensure that this is correct.