改进Model类的__isset方法

This commit is contained in:
thinkphp
2016-07-06 16:26:31 +08:00
parent daba31339e
commit 3d910ea299

View File

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