Browse Source

Merge pull request #9429 from bcrowe/error-template

Consolidate error template setting
Mark Story 9 years ago
parent
commit
369c72114f
1 changed files with 1 additions and 10 deletions
  1. 1 10
      src/Error/ExceptionRenderer.php

+ 1 - 10
src/Error/ExceptionRenderer.php

@@ -270,16 +270,7 @@ class ExceptionRenderer
         $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';