From 91da6974076ee4d55b5f5e437c5618e168b88340 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 6 Jul 2016 15:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Model=E7=B1=BB=E7=9A=84getAtt?= =?UTF-8?q?r=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E=E5=80=BC?= 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 f8a06968..8e4498dd 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -381,6 +381,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess $value = $this->relation()->getRelation($name); // 保存关联对象值 $this->data[$name] = $value; + return $value; } else { throw new InvalidArgumentException('property not exists:' . __CLASS__ . '->' . $name); }