mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进Model类的__isset方法
This commit is contained in:
@@ -1175,7 +1175,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function __isset($name)
|
public function __isset($name)
|
||||||
{
|
{
|
||||||
if (isset($this->data[$name])) {
|
if (array_key_exists($name, $this->data)) {
|
||||||
return true;
|
return true;
|
||||||
} elseif ($this->__get($name)) {
|
} elseif ($this->__get($name)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user