diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 2ff2f0ef5ba..2bd4ada3ad0 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -107,7 +107,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl
if ($dir = opendir($newpath)) {
$filedate = '';
$filesize = '';
-
+ $fileperm = '';
while (false !== ($file = readdir($dir))) { // $file is always a basename (into directory $newpath)
if (!utf8_check($file)) {
$file = utf8_encode($file); // To be sure data is stored in utf8 in memory
diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php
index b919a3c4c3e..6435f91241c 100644
--- a/htdocs/imports/emptyexample.php
+++ b/htdocs/imports/emptyexample.php
@@ -75,9 +75,6 @@ $filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$format;
$objimport = new Import($db);
$objimport->load_arrays($user, $datatoimport);
// Load arrays from descriptor module
-$entity = $objimport->array_import_entities[0][$code];
-$entityicon = $entitytoicon[$entity] ? $entitytoicon[$entity] : $entity;
-$entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $entity;
$fieldstarget = $objimport->array_import_fields[0];
$valuestarget = $objimport->array_import_examplevalues[0];
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 177ebb5739a..5feb7584dab 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -1845,9 +1845,11 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
$linktoenabledisable .= ' '.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'';
}
} else {
- $linktoenabledisable .= 'numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">';
- $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1);
- $linktoenabledisable .= "\n";
+ if (!empty($moduleobj)) {
+ $linktoenabledisable .= 'numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">';
+ $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1);
+ $linktoenabledisable .= "\n";
+ }
}
// Loop to show tab of each module