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->constructClasses();
|
||||||
$this->Components->trigger('initialize', array(&$this));
|
$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)) {
|
if (isset($this->RequestHandler)) {
|
||||||
$this->RequestHandler->startup($this);
|
$this->RequestHandler->startup($this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@ class ExceptionRenderer {
|
||||||
$controller = new CakeErrorController($request, $response);
|
$controller = new CakeErrorController($request, $response);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$controller = new Controller($request, $response);
|
$controller = new Controller($request, $response);
|
||||||
|
$controller->layout = 'error';
|
||||||
$controller->viewPath = 'Errors';
|
$controller->viewPath = 'Errors';
|
||||||
}
|
}
|
||||||
return $controller;
|
return $controller;
|
||||||
|
|
Loading…
Add table
Reference in a new issue