Fix: avoid error if type is not numeric

This commit is contained in:
Regis Houssin 2018-03-07 12:27:13 +01:00
parent 2053cc9307
commit 0f574579eb

View File

@ -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))