forked from Wavyzz/dolibarr
Fix warning
This commit is contained in:
@@ -7539,9 +7539,9 @@ abstract class CommonObject
|
|||||||
else {
|
else {
|
||||||
// $this->{$field} may be null, '', 0, '0', 123, '123'
|
// $this->{$field} may be null, '', 0, '0', 123, '123'
|
||||||
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
|
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
|
$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
|
$queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
|
||||||
}
|
}
|
||||||
} else $queryarray[$field] = null;
|
} else $queryarray[$field] = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user