mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX: We should be able to import value '0'
This commit is contained in:
@@ -401,7 +401,7 @@ class ImportCsv extends ModeleImports
|
||||
// Make some tests on $newval
|
||||
|
||||
// Is it a required field ?
|
||||
if (preg_match('/\*/',$objimport->array_import_fields[0][$val]) && ($newval==''))
|
||||
if (preg_match('/\*/',$objimport->array_import_fields[0][$val]) && ((string) $newval==''))
|
||||
{
|
||||
$this->errors[$error]['lib']=$langs->trans('ErrorMissingMandatoryValue',$key);
|
||||
$this->errors[$error]['type']='NOTNULL';
|
||||
|
||||
@@ -419,7 +419,7 @@ class Importxlsx extends ModeleImports
|
||||
// Make some tests on $newval
|
||||
|
||||
// Is it a required field ?
|
||||
if (preg_match('/\*/',$objimport->array_import_fields[0][$val]) && ($newval==''))
|
||||
if (preg_match('/\*/',$objimport->array_import_fields[0][$val]) && ((string) $newval == ''))
|
||||
{
|
||||
$this->errors[$error]['lib']=$langs->trans('ErrorMissingMandatoryValue',$key);
|
||||
$this->errors[$error]['type']='NOTNULL';
|
||||
|
||||
Reference in New Issue
Block a user