[-] FO : fixed useless error when the product id in the URL is not an int #PSCFV-9726

This commit is contained in:
Damien Metzger
2013-07-11 11:38:57 +02:00
parent c0cdd0a0e1
commit 7cc5196fec
+2 -2
View File
@@ -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');
}