// Fixed warning when calculating the order total of an empty cart

This commit is contained in:
dMetzger committed 2012-05-21 18:56:19 +00:00
1 parent 55527cfa91
commit 1e2c34ed95
1 file changed
+3 -1
+3 -1
View File
@@ -1444,7 +1444,9 @@ class CartCore extends ObjectModel
} }
} }
$id_address_delivery = (is_null($products) ? $this->id_address_delivery : $products[0]['id_address_delivery']); $id_address_delivery = 0;
if (isset($products[0]))
$id_address_delivery = (is_null($products) ? $this->id_address_delivery : $products[0]['id_address_delivery']);
$package = array('id_carrier' => $id_carrier, 'id_address' => $id_address_delivery, 'products' => $products); $package = array('id_carrier' => $id_carrier, 'id_address' => $id_address_delivery, 'products' => $products);
// Then, calculate the contextual value for each one // Then, calculate the contextual value for each one