Merge pull request #351 from oldrind/model

提升Model类单元测试覆盖率
This commit is contained in:
ThinkPHP
2016-03-05 22:20:47 +08:00
2 changed files with 68 additions and 31 deletions

View File

@@ -1544,6 +1544,7 @@ class Model
}
$fields = array_keys($info);
$bind = $type = [];
foreach ($info as $key => $val) {
// 记录字段类型
$type[$key] = $val['type'];
@@ -1835,7 +1836,7 @@ class Model
if (!empty($args) && is_array($args)) {
$options = array_merge($options, $args);
}
} elseif (is_array($scope)) {
} else {
// 直接传入命名范围定义
$options = $scope;
}