From 738afc1cc36399c10bcdef8b1d5451e72e748e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 25 Feb 2021 18:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Base/BaseActiveRecord.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 3a1db3a2..bd5e3ceb 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -487,14 +487,14 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess } /** - * @param null $data + * @param array|null $data * @return bool|$this * @throws Exception */ - public function save($data = NULL): static|bool + public function save(array $data = NULL): static|bool { if (!is_null($data)) { - $this->attributes = $data; + $this->_attributes = $data; } if (!$this->validator($this->rules())) {