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; }