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.
Hello,
After update PHP 7.0 to PHP 7.1, I get this error each time I do a "drush cc all" or when the cron start...
PHP Fatal error: Only variables can be passed by reference in /home/sites/drupal-7/sites/all/modules/commerce/modules/cart/commerce_cart.module on line 1344
Do you have a cure?
Comment | File | Size | Author |
---|---|---|---|
#12 | allow_combine_line_items-2844108-8.patch | 829 bytes | joshmiller |
#8 | allow_combine_line_items-2844108-7.patch | 865 bytes | joshmiller |
#6 | allow_combine_line_items-2844108-6.patch | 937 bytes | Charlotte17 |
Comments
Comment #2
steveoriolOddly, I wanted to test out the "clone" function of the parameters, and by a miracle, the error disappeared ;-) I do not know why, but it's cool.
Before:
After:
Comment #3
bojanz CreditAttribution: bojanz at Centarro commentedDo note that PHP 7.1.0 has a critical regression that actually fails Drupal 8 tests, people were told to not use PHP 7.1 until 7.1.1 is released.
I don't know if that's related to this issue though.
Comment #4
paintingguy CreditAttribution: paintingguy commentedI cannot log into the admin/config with php 7.1. Any suggestions?
Comment #5
steveoriol@paintingguy,
my PHP version for apache2 is still 7.0.
my problem was the PHP (cli) version, it's now 7.1 on an the ubuntu server 16.04. So I guess I only had problem when a use the drush command...
If you are on ubuntu like you can switch the version of PHP by set the php alternative:
Comment #6
Charlotte17 CreditAttribution: Charlotte17 at MTech, LLC commentedfixed to error commerce_cart.module
Comment #8
joshmillerHad the same problem. While yes, I believe we should follow the recommended strategy of PHP 7.0, I also don't see why this change would be outright rejected.
Tested the patch and it needs to be made from within the commerce directory.
Attached is the updated patch.
Comment #10
Charlotte17 CreditAttribution: Charlotte17 at MTech, LLC commented@joshmiller Exactly, what did you do in your patch update?
Comment #11
joshmillerFrom this ^
To this ^
EDIT: Though, it appears it's failing because it doesn't apply, so maybe it just needs a re-roll. Applied for me just fine.
Comment #12
joshmillerYou know what, I think I didn't go deep enough ... the patch shouldn't have commerce in the path.
Attached one more try.
Comment #13
joshmillerComment #15
Charlotte17 CreditAttribution: Charlotte17 at MTech, LLC commented@joshmiller Thanks, I was working on local project!
Comment #16
tuutti CreditAttribution: tuutti as a volunteer commentedThe patch does not apply against 7.x-1.x because this seems to be fixed already on the 7.x-1.x branch (http://cgit.drupalcode.org/commerce/commit/modules/cart/commerce_cart.mo...) or am I missing something?
Comment #17
BerdirConfirmed, this seems to have been fixed elsewhere in 7.x-1.x-dev.
Comment #18
Berdir#2762907: Adding to cart on PHP7 throws notice error fixed this.