diff --git a/classes/Cart.php b/classes/Cart.php index 7d380889b..6636635eb 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -2632,6 +2632,9 @@ class CartCore extends ObjectModel */ public static function desintifier($int, $delimiter = ',') { + if (!$int) + return; + $delimiter_len = $int[0]; $int = strrev(substr($int, 1)); $elm = explode(str_repeat('0', $delimiter_len + 1), $int); diff --git a/classes/Connection.php b/classes/Connection.php index d44729a10..c14ee13fe 100644 --- a/classes/Connection.php +++ b/classes/Connection.php @@ -136,7 +136,7 @@ class ConnectionCore extends ObjectModel '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' ORDER BY `date_add` DESC'; $result = Db::getInstance()->getRow($sql, false); - if (!$result['id_guest'] && (int)$cookie->id_guest) { + if (!isset($result['id_guest']) && (int)$cookie->id_guest) { // The old connections details are removed from the database in order to spare some memory Connection::cleanConnectionsPages(); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 35879aea7..f5070a75b 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2925,7 +2925,9 @@ class AdminProductsControllerCore extends AdminController public function renderForm() { // This nice code (irony) is here to store the product name, because the row after will erase product name in multishop context - $this->product_name = $this->object->name[$this->context->language->id]; + if (Validate::isLoadedObject(($this->object))) { + $this->product_name = $this->object->name[$this->context->language->id]; + } if (!method_exists($this, 'initForm'.$this->tab_display)) { return;