From 2fdba3ad469425b454423ca797a170b0fa591f1c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Nov 2020 12:53:52 +0100 Subject: [PATCH] Fix warning --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 49483224a8a..a50887023d3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7539,9 +7539,9 @@ abstract class CommonObject else { // $this->{$field} may be null, '', 0, '0', 123, '123' if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) { - if ($this->isInt($info)) { + if (isset($this->{$field}) && $this->isInt($info)) { $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 - } elseif ($this->isFloat($info)) { + } elseif (isset($this->{$field}) && $this->isFloat($info)) { $queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 } } else $queryarray[$field] = null;