From c8018672475de2bac5462fc66eefabe2d7dbd74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 14 Sep 2020 14:21:34 +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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 910e7ee9..a6ff3167 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -367,7 +367,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess } } $trance->commit(); - var_dump($param, $attributes); $this->setAttributes($param); $this->afterSave($attributes, $param); $this->refresh(); @@ -414,7 +413,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess */ public function save($data = NULL) { - $this->setAttributes($data); + if (is_array($data)) { + $this->setAttributes($data); + } if (!$this->validator($this->rules()) || !$this->beforeSave()) { return false; }