#FIX: #22509 default value on integer fields don't retrieve by setSaveQuery
This commit is contained in:
parent
659bee1c94
commit
b98eaa4d45
@ -8829,7 +8829,11 @@ abstract class CommonObject
|
||||
// $this->{$field} may be null, '', 0, '0', 123, '123'
|
||||
if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) {
|
||||
if (!isset($this->{$field})) {
|
||||
$queryarray[$field] = 0;
|
||||
if (!empty($info['default'])) {
|
||||
$queryarray[$field] = $info['default'];
|
||||
} else {
|
||||
$queryarray[$field] = 0;
|
||||
}
|
||||
} else {
|
||||
$queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user