This commit is contained in:
2021-11-11 03:33:01 +08:00
parent 68dbaba012
commit 50f6deeae7
+2 -1
View File
@@ -612,7 +612,8 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
*/ */
public function save($data = NULL): static|bool public function save($data = NULL): static|bool
{ {
if (!is_null($data)) { var_dump($this->_attributes);
if (!is_null($data)) {
$this->_attributes = merge($this->_attributes, $data); $this->_attributes = merge($this->_attributes, $data);
} }
if (!$this->validator($this->rules()) || !$this->beforeSave($this)) { if (!$this->validator($this->rules()) || !$this->beforeSave($this)) {