fix-bug 修复当data变量为空 数据不验证

This commit is contained in:
lengai
2017-10-05 13:01:57 +08:00
committed by ThinkPHP
parent e5141a0759
commit 97075e4d98

View File

@@ -1028,7 +1028,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$data = [];
}
if (!empty($data)) {
// 数据自动验证
if (!$this->validateData($data)) {
return false;
@@ -1041,7 +1040,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$this->isUpdate = true;
$this->updateWhere = $where;
}
}
// 自动关联写入
if (!empty($this->relationWrite)) {