Skip to content

Commit

Permalink
Consolidate error template setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Sep 7, 2016
1 parent 9a4258e commit 356ecc9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Error/ExceptionRenderer.php
Expand Up @@ -270,16 +270,7 @@ protected function _template(Exception $exception, $method, $code)
$exception = $this->_unwrap($exception);
$isHttpException = $exception instanceof HttpException;

if (!Configure::read('debug') && !$isHttpException) {
$template = 'error500';
if ($code < 500) {
$template = 'error400';
}

return $this->template = $template;
}

if ($isHttpException) {
if (!Configure::read('debug') && !$isHttpException || $isHttpException) {
$template = 'error500';
if ($code < 500) {
$template = 'error400';
Expand Down

0 comments on commit 356ecc9

Please sign in to comment.