From 7f98be6b1ceff5c2dabedc3bcd90df292ffadef2 Mon Sep 17 00:00:00 2001 From: whwyy Date: Mon, 18 Dec 2023 16:09:21 +0800 Subject: [PATCH] eee --- Base/Model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Base/Model.php b/Base/Model.php index c883330..89adc92 100644 --- a/Base/Model.php +++ b/Base/Model.php @@ -577,7 +577,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \ * @return null * @throws */ - public function getAttribute(string $name) + public function getAttribute(string $name): mixed { return $this->_attributes[$name] ?? NULL; } @@ -833,10 +833,10 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \ * @param string $field * @return array */ - public function getOldAttribute(string $field): array + public function getOldAttribute(string $field): mixed { // TODO: Implement getOldAttribute() method. - return $this->_oldAttributes; + return $this->_oldAttributes[$field] ?? null; } }