From bfc8a0ad021ea2416ce02e37044413170949d49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 29 Apr 2013 13:47:46 +0200 Subject: [PATCH] [-] BO: Fix #PSCFV-8957 order creation when id_cart=0 is present in database but should normally not happen --- controllers/admin/AdminCartsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index fc0cf91ce..e8ee17cef 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -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;