From d4993fa37c1cadd5a47d0f2ebe45fe3143e75d14 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 20 May 2016 15:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Model=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E8=8E=B7=E5=8F=96?= 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 ca0cd63a..e51c44f4 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -955,7 +955,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess */ public function __set($name, $value) { - if (is_null($this->fieldType)) { + if (empty($this->fieldType)) { // 获取字段类型信息并缓存 $this->fieldType = $this->db()->getTableInfo('', 'type'); }