diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index a1c8ba5ba9e..c8578d74d1e 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -954,23 +954,26 @@ class Form global $langs; $langs->load("categorie"); - $all_categories = $categorie->get_all_categories();//on récupère toutes les catégories et leurs attributs + if ($nbcats) + { + $categorie = new Categorie($this -> db); + $all_categories = $categorie->get_all_categories();//on récupère toutes les catégories et leurs attributs - for ($i = 0; $i < $nbcats ; $i++) - { - print '