From ee837df7c9fb1050583ddca078459fc7b6097c8c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 11 May 2016 22:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=8B=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index 778fc531..8f5b8cdd 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -400,7 +400,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $value = null; } if (!in_array($field, $this->change)) { - if(in_array($field, $this->autoTimeField)) { + if (in_array($field, $this->autoTimeField)) { $this->__set($field, $value); } else { $this->__set($field, isset($this->data[$field]) ? $this->data[$field] : $value); @@ -867,7 +867,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess if (!isset(self::$links[$model])) { $class = new static; - self::$links[$model] = Db::connect($class->connection, $model); + self::$links[$model] = Db::connect($class->connection); self::$instance[$model] = $class; } else { $class = self::$instance[$model];