From e6e2449fe6a3423d7980c36ff213a752f1f7fd42 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 2 May 2021 04:55:27 +0800 Subject: [PATCH] modify --- Database/Base/BaseActiveRecord.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 4715f4fe..90786328 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -968,7 +968,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess */ public function offsetExists(mixed $offset): bool { - return $this->has($offset); + return isset($this->_attributes[$offset]); } /** @@ -997,7 +997,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess */ public function offsetUnset(mixed $offset) { - if (!$this->has($offset)) { + if (!isset($this->_attributes[$offset])) { return; } unset($this->_attributes[$offset]);