Jump to content

Errors related to CART.php


malcek

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...