A common error on Drupal 7 running on PHP 7: Fatal error: Only variables can be passed by reference in C:\xampp\htdocs\xxx\sites\all\modules\commerce\modules\cart\commerce_cart.module on line 1344

Fixes:

  1. Ensure Drupal is updated to latest stable version (as of posting: Drupal 7.56)
  2. Install Ctools dev version (as of posting: ctools 7.x-1.x-dev) https://www.drupal.org/project/ctools/releases/7.x-1.x-dev
    This will fix a related error:

    Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context has a deprecated constructor in require_once() (line 113 of C:\xampp\htdocs\xxx\sites\all\modules\ctools\ctools.module).
     

  3. Apply patch for Drupal Commerce and Commerce Cart module as discussed here - https://www.drupal.org/node/2762907
  4. You may also need to check a related patch for Drupal Commerce Shipment module as discussed here - https://www.drupal.org/node/2695493 
Leave a Comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
4 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Get reliable web hosting services

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now