Categorie class was fetching an object even if no param passed
This commit is contained in:
parent
2e18fa88d1
commit
386022947a
@ -75,6 +75,9 @@ class Categorie extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if (empty($id) && empty($label)) return -1;
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||||
if ($id)
|
if ($id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user