[-] FO : fixed useless error when the product id in the URL is not an int #PSCFV-9726
This commit is contained in:
1 parent
c0cdd0a0e1
commit
7cc5196fec
1 file changed
+2
-2
+2
-2
@@ -102,8 +102,8 @@ class LinkCore
|
|||||||
{
|
{
|
||||||
if (is_array($product) && isset($product['id_product']))
|
if (is_array($product) && isset($product['id_product']))
|
||||||
$product = new Product($product['id_product'], false, $id_lang);
|
$product = new Product($product['id_product'], false, $id_lang);
|
||||||
else if (is_numeric($product) || !$product)
|
elseif ((int)$product)
|
||||||
$product = new Product($product, false, $id_lang);
|
$product = new Product((int)$product, false, $id_lang);
|
||||||
else
|
else
|
||||||
throw new PrestaShopException('Invalid product vars');
|
throw new PrestaShopException('Invalid product vars');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user