diff --git a/library/think/Model.php b/library/think/Model.php index 8e4498dd..51f86541 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1294,13 +1294,18 @@ abstract class Model implements \JsonSerializable, \ArrayAccess */ public function __isset($name) { - if (array_key_exists($name, $this->data)) { - return true; - } elseif ($this->getAttr($name)) { - return true; - } else { + try { + if (array_key_exists($name, $this->data)) { + return true; + } elseif ($this->getAttr($name)) { + return true; + } else { + return false; + } + } catch (InvalidArgumentException $e) { return false; } + } /**