diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php
index fdf1d504331..fb09ff65486 100644
--- a/htdocs/core/class/html.formcategory.class.php
+++ b/htdocs/core/class/html.formcategory.class.php
@@ -88,7 +88,7 @@ class FormCategory extends Form
* @param string $selected Id category pre-selection
* @param string $htmlname Name of HTML field
* @param int $showempty Add an empty field
- * @return integer|null
+ * @return int|null
*/
public function selectProductCategory($selected = 0, $htmlname = 'product_category_id', $showempty = 0)
{
@@ -123,6 +123,7 @@ class FormCategory extends Form
return $num_rows;
} else {
dol_print_error($this->db);
+ return;
}
}
}