This commit is contained in:
2021-01-12 19:38:59 +08:00
parent c8a4c3bead
commit ecb903c452
+1 -1
View File
@@ -428,7 +428,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
public function save($data = NULL): static|bool
{
if (is_array($data)) {
$this->setAttributes($data);
$this->_attributes = array_merge($this->_attributes, $data);
}
if (!$this->validator($this->rules()) || !$this->beforeSave()) {
return false;