diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8d2c4ceed46..ad436d5c6c8 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -74,6 +74,9 @@ class Categorie extends CommonObject function fetch($id,$label='') { global $conf; + + // Check parameters + if (empty($id) && empty($label)) return -1; $sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie";