Fix : PHP 8.0 warnings

This commit is contained in:
Lucas Marcouiller 2021-10-23 16:12:44 +02:00
parent 06bc357409
commit b3e9aeef7a
3 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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];

View File

@ -1845,9 +1845,11 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
$linktoenabledisable .= ' &nbsp; <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>';
}
} else {
$linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->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 .= "</a>\n";
if (!empty($moduleobj)) {
$linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->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 .= "</a>\n";
}
}
// Loop to show tab of each module