diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 0afa1854cc8..f56953b4eab 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -1,10 +1,11 @@ - * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012-2016 Juanjo Menent +/* Copyright (C) 2006-2012 Laurent Destailleur + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2026 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -444,7 +445,7 @@ class ImportCsv extends ModeleImports $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; $method = $objimport->array_import_convertvalue[0][$val]['method']; - if ($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] != '') { + if (isset($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval]) && $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] != $newval) { $newval = $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval]; } else { $resultload = dol_include_once($file);