diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 6d9e7c32e22..2e9e4124c7a 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -210,7 +210,7 @@ class ImportCsv extends ModeleImports ini_set('auto_detect_line_endings', 1); // For MAC compatibility $handle = fopen(dol_osencode($file), "r"); - if (!$this->handle) { + if (!$handle) { $langs->load("errors"); $this->error = $langs->trans("ErrorFailToOpenFile", $file); $ret = -1; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 8aa286c5794..b285a9b4f5f 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -268,7 +268,6 @@ class ImportXlsx extends ModeleImports public function import_open_file($file) { // phpcs:enable - global $langs; $ret = 1; dol_syslog(get_class($this) . "::open_file file=" . $file);