Categorie class was fetching an object even if no param passed

This commit is contained in:
Maxime Kohlhaas 2014-07-25 14:11:31 +02:00
parent 2e18fa88d1
commit 386022947a

View File

@ -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";