diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index fba8ddcf7b0..f9ce1c0516e 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -126,6 +126,8 @@ class Categorie global $langs; $langs->load('categories'); + if ($this->socid == -1) $this->socid = 0; + if ($this->already_exists ()) { $this->error=$langs->trans("ImpossibleAddCat");