diff --git a/htdocs/core/modules/dons/html_generic.modules.php b/htdocs/core/modules/dons/html_generic.modules.php
index fa16c9a03b1..49bd1a7a29a 100644
--- a/htdocs/core/modules/dons/html_generic.modules.php
+++ b/htdocs/core/modules/dons/html_generic.modules.php
@@ -166,9 +166,9 @@ class html_generic extends ModeleDon
/**
* Write the object to document file to disk
*
- * @param string $path Path for the file
+ * @param string $path Path for the file
* @param string $contents Contents of the file
- * @return NULL
+ * @return int Return code
*/
private function saveFile($path, $contents)
{
@@ -178,7 +178,7 @@ class html_generic extends ModeleDon
fclose($handle);
dolChmod($path);
- return;
+ return 1;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps