Skip to content

Commit

Permalink
Always use error layout when rendering error pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Mar 31, 2012
1 parent 6fa30db commit 3495422
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -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;
Expand Down

0 comments on commit 3495422

Please sign in to comment.