mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Always use error layout when rendering error pages.
This commit is contained in:
parent
6fa30db504
commit
3495422ac5
2 changed files with 6 additions and 1 deletions
|
@ -56,7 +56,11 @@ class CakeErrorController extends AppController {
|
|||
$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);
|
||||
}
|
||||
|
|
|
@ -150,6 +150,7 @@ class ExceptionRenderer {
|
|||
$controller = new CakeErrorController($request, $response);
|
||||
} catch (Exception $e) {
|
||||
$controller = new Controller($request, $response);
|
||||
$controller->layout = 'error';
|
||||
$controller->viewPath = 'Errors';
|
||||
}
|
||||
return $controller;
|
||||
|
|
Loading…
Add table
Reference in a new issue