From ad8503cd28c22e67262bd642afc8259acac1dc5c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Feb 2024 01:37:51 +0100 Subject: [PATCH] FIX Value of field int = 0 from modulebuilder must nto be set to null --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 50bb759e4b1..d1aa2537597 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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)) {