Active
Project:
Commerce Billy
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jul 2018 at 23:31 UTC
Updated:
12 Sep 2018 at 14:37 UTC
Jump to comment: Most recent
When using "drush cc all", drush returns this error caused by commerc_billy_pdf submodule:
Fatal error: Can't use method return value in write context in .../sites/all/modules/commerce_billy/modules/commerce_billy_pdf/commerce_billy_pdf.module on line 213
This might popup based on PHP version used. The fix would be to store method return value inside variable and pass that to the empty() method like:
$date_arg = $wrapper->{$date_field_name}->value();
$date = !empty($date_arg) ? $date_arg : $order->created;
And the error is gone.
Comments
Comment #2
nickonom commentedI do confirm this happens when working in cli with PHP 5.x, however the error is gone if you load PHP 7.x