This commit is contained in:
2021-12-17 04:12:44 +08:00
parent 547bb85ba9
commit dd369d348c
+3 -2
View File
@@ -33,6 +33,7 @@ use Kiri\Exception\NotFindClassException;
use Kiri\Kiri; use Kiri\Kiri;
use Kiri\ToArray; use Kiri\ToArray;
use ReflectionException; use ReflectionException;
use ReturnTypeWillChange;
use validator\Validator; use validator\Validator;
/** /**
@@ -1000,7 +1001,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
* @param mixed $value * @param mixed $value
* @throws Exception * @throws Exception
*/ */
public function offsetSet(mixed $offset, mixed $value) #[ReturnTypeWillChange] public function offsetSet(mixed $offset, mixed $value)
{ {
$this->__set($offset, $value); $this->__set($offset, $value);
} }
@@ -1009,7 +1010,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
* @param mixed $offset * @param mixed $offset
* @throws Exception * @throws Exception
*/ */
public function offsetUnset(mixed $offset) #[ReturnTypeWillChange] public function offsetUnset(mixed $offset)
{ {
if (!isset($this->_attributes[$offset]) if (!isset($this->_attributes[$offset])
&& !isset($this->_oldAttributes[$offset])) { && !isset($this->_oldAttributes[$offset])) {