diff --git a/library/think/Model.php b/library/think/Model.php index 07592671..63e1622f 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -132,7 +132,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess if ($this->disuse) { // 废弃字段 foreach ((array) $this->disuse as $key) { - if (isset($this->data[$key])) { + if (array_key_exists($key, $this->data)) { unset($this->data[$key]); } }