diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 110d80b45d1..2b8a2d15aff 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1182,7 +1182,7 @@ class FormFile
);
$reshook = $hookmanager->executeHooks('showFilesList', $parameters, $object);
- if (isset($reshook) && $reshook != '') { // null or '' for bypass
+ if (!empty($reshook)) { // null or '' for bypass
return $reshook;
} else {
if (!is_object($form)) {