改进Connection类的getResult方法 改进App类的run方法返回值 Builder类的parseValue方法增加field参数

This commit is contained in:
thinkphp
2016-06-15 15:45:42 +08:00
parent 381784755f
commit cabf5c4fdf
4 changed files with 16 additions and 20 deletions

View File

@@ -113,11 +113,11 @@ class App
// 输出数据到客户端
if ($data instanceof Response) {
return $data;
} elseif (!is_null($data)) {
} else {
// 默认自动识别响应输出类型
$isAjax = $request->isAjax();
$type = $isAjax ? Config::get('default_ajax_return') : Config::get('default_return_type');
return Response::create($data, $type);
return Response::create( is_null($data) ? '' : $data, $type);
}
}