mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进Model类的__isset方法
This commit is contained in:
@@ -1297,10 +1297,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
try {
|
try {
|
||||||
if (array_key_exists($name, $this->data)) {
|
if (array_key_exists($name, $this->data)) {
|
||||||
return true;
|
return true;
|
||||||
} elseif ($this->getAttr($name)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
$this->getAttr($name);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
} catch (InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user