diff --git a/library/think/Response.php b/library/think/Response.php index 1feec722..3a2c9034 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -223,7 +223,7 @@ class Response public function header($name, $value = null) { if (is_array($name)) { - $this->header = $name; + $this->header = array_merge($this->header, $name); } else { $this->header[$name] = $value; } diff --git a/library/think/exception/Handle.php b/library/think/exception/Handle.php index a4737fc3..1a2dbc61 100644 --- a/library/think/exception/Handle.php +++ b/library/think/exception/Handle.php @@ -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); }