Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | UC-Recurring-Payments-Subscriptions-2569135-1_1.patch | 651 bytes | fornigam |
#2 | uc_recurring.fix_warning_2569135_01.patch | 570 bytes | rfay |
Comments
Comment #2
rfayHere's the patch.
Comment #3
jabrister CreditAttribution: jabrister commentedI'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?
Comment #4
rfay@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.
Comment #5
jabrister CreditAttribution: jabrister commentedThanks 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?
Comment #6
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedThe 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():
Hope this helps!
Comment #7
austusnobet CreditAttribution: austusnobet commentedWorks fine for me
Comment #8
fornigam CreditAttribution: fornigam as a volunteer and at Cybage Software Pvt Ltd. commentedHi
Why should not make patch for change. it's easy to update and help us to save time.
Here is the patch of #6
Comment #9
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedThanks 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.
Comment #10
glynster CreditAttribution: glynster commentedYes both patches resolves the issue.