FIX Value of field int = 0 from modulebuilder must nto be set to null

This commit is contained in:
Laurent Destailleur
2024-02-14 01:37:51 +01:00
parent 8592f6ba49
commit ad8503cd28

View File

@@ -9515,7 +9515,7 @@ abstract class CommonObject
$queryarray[$field] = ((int) $conf->entity);
} else {
// $this->{$field} may be null, '', 0, '0', 123, '123'
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
if ((isset($this->{$field}) && ((string) $this->{$field}) != '') || !empty($info['notnull'])) {
if (!isset($this->{$field})) {
$queryarray[$field] = 0;
} elseif ($this->isInt($info)) {