Fix warning

This commit is contained in:
Laurent Destailleur 2020-11-07 14:35:28 +01:00
parent a72107ce06
commit c071dd254b

View File

@ -7531,7 +7531,13 @@ abstract class CommonObject
} elseif ($this->isDuration($info))
{
// $this->{$field} may be null, '', 0, '0', 123, '123'
if ($this->{$field} != '' || !empty($info['notnull'])) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
if (!isset($this->{$field})) {
$queryarray[$field] = 0;
} else {
$queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
}
}
else $queryarray[$field] = null;
} elseif ($this->isInt($info) || $this->isFloat($info))
{