Administrator
- Join Date:
- Sep 2009
- Location:
- Stuart, FL
- Posts:
- 14,065
- Plugin Contributions:
- 56
[Done v1.5.5] PHP 5.4 warnings: Illegal string offset
Using a stock v1.5.1 install (localhost) running php 5.4.8 on Windows 7. Added the product New v1.2 -> Downloads -> Single Download to my cart, signed in and clicked the Checkout button. I was properly redirected to the checkout_payment page, but had two debug*.log files generated:
[19-Nov-2012 20:12:07 Europe/Berlin] PHP Warning: Illegal string offset 'cost' in C:\xampp\htdocs\v1.5.1\includes\classes\order.php on line 355
[19-Nov-2012 20:12:07 Europe/Berlin] PHP Warning: Illegal string offset 'title' in C:\xampp\htdocs\v1.5.1\includes\modules\pages\checkout_shipping\header_php.php on line 88
[19-Nov-2012 20:12:08 Europe/Berlin] PHP Warning: Illegal string offset 'cost' in C:\xampp\htdocs\v1.5.1\includes\classes\order.php on line 355
[19-Nov-2012 20:12:08 Europe/Berlin] PHP Warning: Illegal string offset 'id' in C:\xampp\htdocs\v1.5.1\includes\classes\shipping.php on line 32
[19-Nov-2012 20:12:08 Europe/Berlin] PHP Warning: Illegal string offset 'id' in C:\xampp\htdocs\v1.5.1\includes\classes\shipping.php on line 32
[19-Nov-2012 20:12:08 Europe/Berlin] PHP Warning: Illegal string offset 'id' in C:\xampp\htdocs\v1.5.1\includes\modules\order_total\ot_shipping.php on line 41
[19-Nov-2012 20:12:08 Europe/Berlin] PHP Warning: Illegal string offset 'id' in C:\xampp\htdocs\v1.5.1\includes\modules\order_total\ot_shipping.php on line 41
In each case, the illegal offset is associated with an undefined array element. For example, line 355 of order.php contains:
'shipping_cost' => $_SESSION['shipping']['cost'],
I'm not quite sure how to proceed. Are these warnings indicative of something that might become errors in a future version of PHP?