Handle the case where viewPath changes.

Fixes #2537
This commit is contained in:
mark_story 2012-02-03 21:29:37 -05:00
parent ee083e047e
commit 437d68c60b
2 changed files with 4 additions and 1 deletions

View file

@ -278,8 +278,10 @@ class ExceptionRenderer {
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();

View file

@ -686,6 +686,7 @@ class ExceptionRendererTest extends CakeTestCase {
$this->assertEquals('', $ExceptionRenderer->controller->layoutPath);
$this->assertEquals('', $ExceptionRenderer->controller->subDir);
$this->assertEquals('View', $ExceptionRenderer->controller->viewClass);
$this->assertEquals('Errors/', $ExceptionRenderer->controller->viewPath);
}
/**