Fix: avoid error if type is not numeric
This commit is contained in:
parent
2053cc9307
commit
0f574579eb
1 changed files with 2 additions and 0 deletions
|
|
@ -1201,6 +1201,8 @@ class Categorie extends CommonObject
|
|||
*/
|
||||
function get_all_categories($type=null, $parent=false)
|
||||
{
|
||||
if (! is_numeric($type)) $type = $this->MAP_ID[$type];
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " WHERE entity IN (".getEntity('category').")";
|
||||
if (! is_null($type))
|
||||
|
|
|
|||
Loading…
Reference in a new issue