Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Always use error layout when rendering error pages.

  • Loading branch information...
commit 3495422ac5bde8667becaa1e4afc12c9d139c69b 1 parent 6fa30db
@ADmad ADmad authored
View
6 lib/Cake/Controller/CakeErrorController.php
@@ -56,7 +56,11 @@ public function __construct($request = null, $response = null) {
$this->constructClasses();
$this->Components->trigger('initialize', array(&$this));
- $this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
+ $this->_set(array(
+ 'cacheAction' => false,
+ 'viewPath' => 'Errors',
+ 'layout' => 'error'
+ ));
if (isset($this->RequestHandler)) {
$this->RequestHandler->startup($this);
}
View
1  lib/Cake/Error/ExceptionRenderer.php
@@ -150,6 +150,7 @@ protected function _getController($exception) {
$controller = new CakeErrorController($request, $response);
} catch (Exception $e) {
$controller = new Controller($request, $response);
+ $controller->layout = 'error';
$controller->viewPath = 'Errors';
}
return $controller;

0 comments on commit 3495422

Please sign in to comment.
Something went wrong with that request. Please try again.