Fix 0 is a valif value for a NOT NULL field
This commit is contained in:
parent
f0d6099e5f
commit
25b455272a
@ -6221,7 +6221,7 @@ abstract class CommonObject
|
||||
if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]='';
|
||||
|
||||
//var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1));
|
||||
if ($this->fields[$key]['notnull'] == 1 && empty($values[$key]))
|
||||
if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]))
|
||||
{
|
||||
$error++;
|
||||
$this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user