From 7445dce2e8c645c2b6f46c0fdf4b7a573de5ac7f Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 6 Jul 2017 18:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index 7420d563..94b61bac 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1132,7 +1132,7 @@ 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) { + if ((empty($a) || empty($b)) && $a !== $b) { return 1; } return is_object($a) || $a != $b ? 1 : 0;