Fix: avoid error if type is not numeric
This commit is contained in:
parent
2053cc9307
commit
0f574579eb
@ -1201,6 +1201,8 @@ class Categorie extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function get_all_categories($type=null, $parent=false)
|
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 = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
|
||||||
$sql.= " WHERE entity IN (".getEntity('category').")";
|
$sql.= " WHERE entity IN (".getEntity('category').")";
|
||||||
if (! is_null($type))
|
if (! is_null($type))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user