Strict warning: Only variables should be passed by reference in uc_recurring_product_form_uc_cart_checkout_form_alter() (line 409 of /opt/lampp/htdocs/mysite/sites/all/modules/uc_recurring/modules/uc_recurring_product/uc_recurring_product.module).

I got this error when I click checkout from /cart page.

Comments

sumitmadan’s picture

Status: Active » Fixed

Changed 409 line from :
$form['panes']['payment']['payment_method']['#default_value'] = array_pop(array_keys($form['panes']['payment']['payment_method']['#options']));
to

$paymentMethodKeys = array_keys($form['panes']['payment']['payment_method']['#options']);
        $form['panes']['payment']['payment_method']['#default_value'] = array_pop($paymentMethodKeys);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

emcniece’s picture

Just hit this too - easy fix, but should the system really mark it as closed and fix? I hope the maintainer sees this...

longwave’s picture

Status: Closed (fixed) » Needs review

Not fixed, needs review by the maintainer.

tinker’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.3 KB

Confirmed problem still in dev and code change in #1 fixes problem. Attached patch using #1.
Apply patch using git am uc_recurring-only-var-pass-by-ref-1983238-5.patch

tinker’s picture

Grrr, just noticed the variable name $paymentMethodKeys does not follow coding standards. Renamed to $payment_method_keys.
Apply patch using git am uc_recurring-only-var-pass-by-ref-1983238-6.patch

univate’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.