mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
fix-bug 修复当data变量为空 数据不验证
This commit is contained in:
@@ -1028,7 +1028,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$data = [];
|
$data = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data)) {
|
|
||||||
// 数据自动验证
|
// 数据自动验证
|
||||||
if (!$this->validateData($data)) {
|
if (!$this->validateData($data)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1041,7 +1040,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$this->isUpdate = true;
|
$this->isUpdate = true;
|
||||||
$this->updateWhere = $where;
|
$this->updateWhere = $where;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 自动关联写入
|
// 自动关联写入
|
||||||
if (!empty($this->relationWrite)) {
|
if (!empty($this->relationWrite)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user