diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php
index dec81f921ec..1852fc9f878 100644
--- a/htdocs/core/class/html.formsetup.class.php
+++ b/htdocs/core/class/html.formsetup.class.php
@@ -249,7 +249,7 @@ class FormSetup
* saveConfFromPost
*
* @param bool $noMessageInUpdate display event message on errors and success
- * @return int -1 if KO, 1 if OK
+ * @return int|null Return -1 if KO, 1 if OK, null if no items
*/
public function saveConfFromPost($noMessageInUpdate = false)
{
@@ -266,7 +266,6 @@ class FormSetup
return $reshook;
}
-
if (empty($this->items)) {
return null;
}