This is a simple win, just a change in PHP over time. This patch fixes the inappropriate usage that generates the warning:

Strict warning: Only variables should be passed by reference in uc_recurring_order_information() (line 542 of /Users/rfay/workspace/wsupg/docroot/sites/all/modules/contrib/uc_recurring/uc_recurring.admin.inc).

There is no functional change here, just makes PHP happy.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay created an issue. See original summary.

rfay’s picture

Here's the patch.

jabrister’s picture

I'm using version 7.x-2.0-alpha3+dev and I applied the patch but I still get the following error message:

Strict warning: Only variables should be passed by reference in uc_recurring_admin() (line 15 of /home/mydomain/public_html/sites/all/modules/uc_recurring/uc_recurring.admin.inc).

What can I do?

rfay’s picture

@jabrister, that's a different error. This one fixes the problem in 542. So "what can you do" - Describe how to demonstrate the problem (in another issue probably) and provide a patch for it. Alternately, figure out the solution and reroll this one with a solution for both.

This is not a fatal error, and doesn't actually cause any likely problems, but it's great to get rid of these.

jabrister’s picture

Thanks rfay, it would be nice to get rid of the error message, but if you say it's not fatal, I'll happily ignore it. If I knew how to write a patch for it, I might not have needed to post here. That being said, do you have any pointers how I might go about writing the patch for this? What the problem is?

LeDucDuBleuet’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #1 although not applying cleanly against current dev, does the job once applied manually.

Thank you.

@jabrister This may be too little too late but the error in line #15 is basically the same.

You have to use a variable instead of passing the function result directly to render():

  //$output = render(drupal_get_form('uc_recurring_admin_filter_form', $item));
  $form = drupal_get_form('uc_recurring_admin_filter_form', $item);
  $output = render($form);

Hope this helps!

austusnobet’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha3

Works fine for me

fornigam’s picture

Hi

Why should not make patch for change. it's easy to update and help us to save time.

Here is the patch of #6

LeDucDuBleuet’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch, I did not provide one since we decided against using this module due to its current alpha/dev state which did not meet our production site stability requirements.

For anyone coming here, both patches #2 & #8 are needed to get rid of the error messages.

glynster’s picture

Yes both patches resolves the issue.