[-] BO: Fix #PSCFV-8957 order creation when id_cart=0 is present in database but should normally not happen

This commit is contained in:
Rémi Gaillard
2013-04-29 13:47:46 +02:00
parent e036d47d13
commit bfc8a0ad02
+1 -1
View File
@@ -209,7 +209,7 @@ class AdminCartsControllerCore extends AdminController
if (!$this->context->cart->id_customer)
$this->context->cart->id_customer = $id_customer;
if ($this->context->cart->OrderExists())
if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists())
return;
if (!$this->context->cart->secure_key)
$this->context->cart->secure_key = $this->context->customer->secure_key;