修正Model类的getAttr方法返回值

This commit is contained in:
thinkphp
2016-07-06 15:16:27 +08:00
parent a05cb7a1ab
commit 91da697407

View File

@@ -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);
}