From 7cc5196fecfa031c073d5519e584b9274541da0d Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 11 Jul 2013 11:38:32 +0200 Subject: [PATCH] [-] FO : fixed useless error when the product id in the URL is not an int #PSCFV-9726 --- classes/Link.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Link.php b/classes/Link.php index 3ecdabcb6..b39977aff 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -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'); }