This commit is contained in:
as2252258@163.com
2021-05-02 04:55:27 +08:00
parent 1a11178875
commit e6e2449fe6
+2 -2
View File
@@ -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]);