diff --git a/classes/shop/ShopUrl.php b/classes/shop/ShopUrl.php index fcb6d5b06..7e5011cae 100644 --- a/classes/shop/ShopUrl.php +++ b/classes/shop/ShopUrl.php @@ -167,8 +167,13 @@ class ShopUrlCore extends ObjectModel FROM '._DB_PREFIX_.'shop_url WHERE main = 1 AND id_shop = '.($id_shop !== null ? (int)$id_shop : (int)Context::getContext()->shop->id)); - self::$main_domain[(int)$id_shop] = $row['domain']; - self::$main_domain_ssl[(int)$id_shop] = $row['domain_ssl']; + if ($row && is_array($row)) { + self::$main_domain[(int)$id_shop] = $row['domain']; + self::$main_domain_ssl[(int)$id_shop] = $row['domain_ssl']; + } else { + self::$main_domain[(int)$id_shop] = null; + self::$main_domain_ssl[(int)$id_shop] = null; + } } }