Running PHP 5.5.17 I get the following strict warning:
Strict warning: Only variables should be passed by reference in commerce_add_to_cart_extras_handler_field_quantity->views_form_submit() (line 172 of docroot/sites/all/modules/contrib/commerce_add_to_cart_extras/commerce_add_to_cart_extras_handler_field_quantity.inc).
On line 172:
$path = 'node/' . array_shift(array_keys($result['node']));
The array keys must be set to variable and that variable is then passed in like so:
$array_keys = array_keys($result['node']);
$path = 'node/' . array_shift($array_keys);
unset($array_keys);
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | commerce_add_to_cart_extras-2530136-4.patch | 1.21 KB | blasthaus |
| #1 | commerce_add_to_cart_extras-2530136-1.patch | 1.01 KB | capellic |
Comments
Comment #1
capellicPatch attached.
Comment #2
blasthaus commentedNice but would it not be better to use
reset($array_keys);rather than array_shift ?Comment #3
joelpittet@blasthaus yes, want to post that as a patch? Also there is some whitespace issues with the patch.
Comment #4
blasthaus commentedOk here you go.
Comment #5
joelpittetNice, thanks @blasthaus
Comment #6
joelpittetI forgot someone gave me commit access to this:) Committed to -dev thanks @blasthaus and @capellic