From aed8be7150867173af3d10271e6943b3ee882c8d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 29 Nov 2016 15:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E6=95=B0=E6=8D=AE=E6=AF=94=E8=BE=83?= 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 df3692ed..fde0c318 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -300,7 +300,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess } // 标记字段更改 - if (!isset($this->data[$name]) || ($this->data[$name] != $value && !in_array($name, $this->change))) { + if (!isset($this->data[$name]) || (0 !== strcmp($this->data[$name], $value) && !in_array($name, $this->change))) { $this->change[] = $name; } // 设置数据对象属性