This commit is contained in:
thinkphp
2016-04-18 20:18:55 +08:00
5 changed files with 70 additions and 21 deletions

View File

@@ -69,6 +69,7 @@ class Error
// 记录异常日志
Log::record($log, 'error');
Log::save();
/* 非API模式下的部署模式跳转到指定的 Error Page */
$error_page = Config::get('error_page');

View File

@@ -61,17 +61,11 @@ class Response
$handler = !empty($_GET[Config::get('var_jsonp_handler')]) ? $_GET[Config::get('var_jsonp_handler')] : Config::get('default_jsonp_handler');
$data = $handler . '(' . json_encode($data, JSON_UNESCAPED_UNICODE) . ');';
break;
case '':
case 'html':
case 'text':
// 不做处理
break;
default:
// 用于扩展其他返回格式数据
APP_HOOK && Hook::listen('return_data', $data);
}
}
APP_HOOK && Hook::listen('return_data', $data);
if ($return) {
return $data;
}

View File

@@ -14,7 +14,7 @@ namespace think\console\output;
use think\console\Output;
class Null extends Output
class Nothing extends Output
{
/** @noinspection PhpMissingParentConstructorInspection */
public function __construct()