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