FIX: We should be able to import value '0'
This commit is contained in:
parent
695cccca1c
commit
0e7fb80a34
2 changed files with 2 additions and 2 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue