Fix Trying to access array offset on value of type bool

PHP Notice:  Trying to access array offset on value of type bool
This commit is contained in:
wdammak
2024-08-24 01:21:35 +01:00
committed by GitHub
parent e13655ad99
commit 7f484f4d5c

View File

@@ -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;
}
}
}