From b53e4f3ea63278a14e364514a32749a5c3fefc5d Mon Sep 17 00:00:00 2001 From: "xiaobo.sun" <5ini99@sohu.com> Date: Mon, 15 Feb 2016 14:39:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9setInc,setDec=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=89=A7=E8=A1=8C=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在调用setInc,setDec方法时处理$this->duplicate = [];为空。否则在209行的 // 存在数据副本 $data = array_diff_assoc($data, $this->duplicate); 验证不通过 --- library/think/Model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/think/Model.php b/library/think/Model.php index dd56392d..7e26828b 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -706,6 +706,7 @@ class Model $step = '-' . $step; } } + $this->duplicate = []; return $this->setField($field, ['exp', $field . '+' . $step]); } @@ -735,6 +736,7 @@ class Model $step = '-' . $step; } } + $this->duplicate = []; return $this->setField($field, ['exp', $field . '-' . $step]); }