修正Model类一处警告错误

This commit is contained in:
thinkphp
2016-02-14 23:57:27 +08:00
parent 3b9c814f3c
commit 5fa70f5741

View File

@@ -253,7 +253,7 @@ class Model
foreach ($data as $key => $val) {
if (!in_array($key, $fields, true)) {
if (Config::get('db_fields_strict')) {
throw new Exception(' fields not exists :[' . $key . '=>' . $val . ']');
throw new Exception(' fields not exists :[ ' . $key . ' ]');
}
unset($data[$key]);
} elseif (is_scalar($val) && !isset($this->options['bind'][$key])) {
@@ -1136,7 +1136,7 @@ class Model
$range = is_array($rule) ? $rule : explode(',', $rule);
$result = 'in' == $type ? in_array($value, $range) : !in_array($value, $range);
break;
case 'between': // 验证是否在某个范围
case 'between':// 验证是否在某个范围
case 'notbetween': // 验证是否不在某个范围
if (is_string($rule)) {
$rule = explode(',', $rule);