From 3d910ea299c1a75f9ff39b0714a039fbe9976bf8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 6 Jul 2016 16:26:31 +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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index 51f86541..b311b30c 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1297,10 +1297,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess try { if (array_key_exists($name, $this->data)) { return true; - } elseif ($this->getAttr($name)) { - return true; } else { - return false; + $this->getAttr($name); + return true; } } catch (InvalidArgumentException $e) { return false;