[Done v1.5.2] PHP 5.4.12, PHP Warning: Illegal string offset 'cost'
Using PHP 5.4.12 and zen v151
During checkout: Step 1 of 3 - Delivery Information
Click: Change the Address
Change the Shipping Address: add a new address or choose another.
Click: Continue, goes back to Step 1 of 3 - Delivery Information
At this point I get the error:
PHP Warning: Illegal string offset 'cost' in /home/XXXXXXX/public_html/includes/classes/order.php on line 355
Quick temporary fix. Find line 355
PHP Code:
'shipping_cost' => $_SESSION['shipping']['cost'],
Change to
PHP Code:
'shipping_cost' => (isset($_SESSION['shipping']['cost']) ? $_SESSION['shipping']['cost'] : 0),
Re: PHP 5.4.12, PHP Warning: Illegal string offset 'cost'
This is a complicated issue to fix "completely", as these array elements are used in multiple ways, both as strings and as arrays. IIRC this lovely code was inherited from osC.
Discussed more in a previous thread: http://www.zen-cart.com/showthread.p...-string-offset