malcek Posted October 25, 2018 Share Posted October 25, 2018 Hello, for last month I'm getting a lot of error in error.log for invalid argument PHP Warning: Invalid argument supplied for foreach() in /home/zaodrasle/public_html/classes/Cart.php on line 2675 line in cart.php file is: foreach ($delivery_option as $id_address => $key) { can anbody advice me how to correct this running on PHP 7.0.32 Prestashop ver. 1.6.1.22 thanks Martin Link to comment Share on other sites More sharing options...
Rolige Posted October 25, 2018 Share Posted October 25, 2018 Hello: If everything else is working fine it should be not a problem. If you want to remove warning completly just add this code before foreach, but keep and eye on total cart shipping cost calculations: if (!is_array($delivery_option_list)) return $total_shipping; Regards Link to comment Share on other sites More sharing options...
malcek Posted October 29, 2018 Author Share Posted October 29, 2018 thank you for your replay. I'll try this solution this wee and let you know how it goes. best regards Martin Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now