diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 67cd2a4f5e0..56f26eb2dd9 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -781,7 +781,8 @@ class Categorie extends CommonObject $objs = array(); - $obj = new $this->MAP_OBJ_CLASS[$type]($this->db); + $tmpclass = $this->MAP_OBJ_CLASS[$type]; + $obj = new $tmpclass($this->db); $sql = "SELECT c.fk_".$this->MAP_CAT_FK[$type]; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_".$this->MAP_CAT_TABLE[$type]." as c";