diff --git a/library/think/Model.php b/library/think/Model.php index e92a9344..535d76a2 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1078,6 +1078,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess public function getChangedData() { $data = array_udiff_assoc($this->data, $this->origin, function ($a, $b) { + if ((empty($b) || empty($b)) && $a !== $b) { + return 1; + } return is_object($a) || $a != $b ? 1 : 0; });