This commit is contained in:
2022-09-21 14:27:26 +08:00
parent 4a654821a1
commit 1bc5e49b42
+5 -1
View File
@@ -662,7 +662,11 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
$assoc = array_diff_assoc($this->_attributes, $this->_oldAttributes);
$uassoc = array_intersect_assoc($this->_attributes, $this->_oldAttributes);
foreach ($assoc as $key => $item) {
if ($item === null) {
unset($assoc[$key]);
}
}
return [$assoc, $uassoc, array_keys($assoc)];
}