改进Handle类支持异常的多语言 Lang类增加has方法 增加核心中文语言包

This commit is contained in:
thinkphp
2016-06-16 16:07:44 +08:00
parent d8fc0bf7aa
commit 50d1798e92
35 changed files with 151 additions and 59 deletions

View File

@@ -94,7 +94,7 @@ abstract class Builder
foreach ($data as $key => $val) {
if (!in_array($key, $fields, true)) {
if ($options['strict']) {
throw new Exception(' fields not exists :[' . $key . ']');
throw new Exception('fields not exists:[' . $key . ']');
}
} else {
$item = $this->parseKey($key);
@@ -611,7 +611,7 @@ abstract class Builder
foreach ($data as $key => $val) {
if (!in_array($key, $fields, true)) {
if ($options['strict']) {
throw new Exception(' fields not exists :[' . $key . ']');
throw new Exception('fields not exists:[' . $key . ']');
}
unset($data[$key]);
} elseif (is_scalar($val)) {