Fix exceptions being thrown in beforeFilter breaking error pages.

If an exception was raised in the AppController::beforeFilter(),
requests for content-type responses would render as HTML. Extracting the
startupProcess() allows us to keep a reference to the error controller,
which can be used to force startup RequestHandlerComponent if its
enabled.

Fixes 
This commit is contained in:
mark_story 2012-11-24 15:38:42 -05:00
parent e04e0a0ec8
commit 3083b01f7d
2 changed files with 4 additions and 2 deletions
lib/Cake/Controller

View file

@ -66,8 +66,6 @@ class CakeErrorController extends AppController {
if ($this->Components->enabled('Security')) {
$this->Components->disable('Security');
}
$this->startupProcess();
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
}