forked from Wavyzz/dolibarr
Fix: Removed warning when foreign key table is empty
This commit is contained in:
@@ -374,8 +374,8 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we check in cache
|
// Now we check cache is not empty (should not) and key is into cache
|
||||||
if (! in_array($newval,$this->cachefieldtable[$field.'@'.$table]))
|
if (! is_array($this->cachefieldtable[$field.'@'.$table]) || ! in_array($newval,$this->cachefieldtable[$field.'@'.$table]))
|
||||||
{
|
{
|
||||||
$this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,$field,$table);
|
$this->errors[$error]['lib']=$langs->trans('ErrorFieldValueNotIn',$key,$newval,$field,$table);
|
||||||
$this->errors[$error]['type']='FOREIGNKEY';
|
$this->errors[$error]['type']='FOREIGNKEY';
|
||||||
|
|||||||
Reference in New Issue
Block a user