From c850581ad8a4f59fd488cb33ddf73af36fc8227c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jan 2025 02:47:32 +0100 Subject: [PATCH] Debug v21 - Fix import --- htdocs/core/modules/import/import_csv.modules.php | 2 +- htdocs/core/modules/import/import_xlsx.modules.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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);