diff --git a/classes/ProductJson.php b/classes/ProductJson.php index e415ba3..c52567e 100644 --- a/classes/ProductJson.php +++ b/classes/ProductJson.php @@ -111,10 +111,10 @@ private function getSingleProduct($id_product, $id_lang) private function getProductDefaultCategory($idCategory, $idLanguage) { - if (!isset($this->categoryCache[$idCategory])) { + if ($idCategory && !isset($this->categoryCache[$idCategory])) { $this->categoryCache[$idCategory] = $this->translateCategory($idCategory, $idLanguage); } - return empty($this->categoryCache[$idCategory]) ? "" : $this->categoryCache[$idCategory]; + return !$idCategory || empty($this->categoryCache[$idCategory]) ? "" : $this->categoryCache[$idCategory]; } private function translateCategory($idCategory, $idLanguage) diff --git a/roihunter.php b/roihunter.php index 61af5f3..e0b5ba8 100644 --- a/roihunter.php +++ b/roihunter.php @@ -44,7 +44,7 @@ public function __construct() { $this->name = 'roihunter'; $this->tab = 'advertising_marketing'; - $this->version = '1.2.0'; + $this->version = '1.2.1'; $this->author = 'ROI Hunter'; $this->need_instance = 1; $this->bootstrap = true;