Skip to content

Commit

Permalink
Handle the case where viewPath changes.
Browse files Browse the repository at this point in the history
Fixes #2537
  • Loading branch information
markstory committed Feb 4, 2012
1 parent ee083e0 commit 437d68c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -278,8 +278,10 @@ protected function _outputMessage($template) {
protected function _outputMessageSafe($template) {
$this->controller->layoutPath = '';
$this->controller->subDir = '';
$this->controller->helpers = array('Form', 'Html', 'Session');
$this->controller->viewPath = 'Errors/';
$this->controller->viewClass = 'View';
$this->controller->helpers = array('Form', 'Html', 'Session');

$this->controller->render($template);
$this->controller->response->type('html');
$this->controller->response->send();
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Error/ExceptionRendererTest.php
Expand Up @@ -686,6 +686,7 @@ public function testMissingSubdirRenderSafe() {
$this->assertEquals('', $ExceptionRenderer->controller->layoutPath);
$this->assertEquals('', $ExceptionRenderer->controller->subDir);
$this->assertEquals('View', $ExceptionRenderer->controller->viewClass);
$this->assertEquals('Errors/', $ExceptionRenderer->controller->viewPath);
}

/**
Expand Down

0 comments on commit 437d68c

Please sign in to comment.