Fix warning
This commit is contained in:
parent
a72107ce06
commit
c071dd254b
@ -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))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user