From 62cb8165f3830718ade3fd526b94fdb9560ef363 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 2 Sep 2016 11:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BB=E4=B8=80?= =?UTF-8?q?=E5=A4=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/think/Model.php b/library/think/Model.php index e5a107f8..02cb6854 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -629,6 +629,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess // 检测字段 if (!empty($this->field)) { + $this->db(); foreach ($this->data as $key => $val) { if (!in_array($key, $this->field)) { unset($this->data[$key]);