From 031de8c99d6def383c65ac86f9c6a7b798f45de2 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 30 May 2016 15:19:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BB=E7=9A=84=5F=5F?= =?UTF-8?q?isset=E6=96=B9=E6=B3=95=20=E6=94=AF=E6=8C=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=99=A8=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/think/Model.php b/library/think/Model.php index 4867434b..0cb19cda 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1151,7 +1151,13 @@ abstract class Model implements \JsonSerializable, \ArrayAccess */ public function __isset($name) { - return isset($this->data[$name]); + if (isset($this->data[$name])) { + return true; + } elseif ($this->__get($name)) { + return true; + } else { + return false; + } } /**