404异常跳转URL配置参数 改为 异常模板地址参数 http_exception_template

This commit is contained in:
thinkphp
2016-06-07 12:24:32 +08:00
parent ae2824ced1
commit 7a579ca60e
2 changed files with 5 additions and 5 deletions

View File

@@ -95,10 +95,10 @@ class Handle
*/
protected function renderHttpException(HttpException $e)
{
$status = $e->getStatusCode();
$error = Config::get('http_exception_url');
if (!APP_DEBUG && !empty($error[$status])) {
return Response::create($error[$status], 'redirect')->send();
$status = $e->getStatusCode();
$template = Config::get('http_exception_template');
if (!APP_DEBUG && !empty($template[$status])) {
return Response::create($template[$status], 'view')->vars(['e' => $e])->send();
} else {
return $this->convertExceptionToResponse($e);
}