diff --git a/lib/Cake/Controller/CakeErrorController.php b/lib/Cake/Controller/CakeErrorController.php index 6131bcb14d1..5778648818a 100644 --- a/lib/Cake/Controller/CakeErrorController.php +++ b/lib/Cake/Controller/CakeErrorController.php @@ -54,12 +54,15 @@ public function __construct($request = null, $response = null) { $this->components[] = 'RequestHandler'; } $this->constructClasses(); + if ($this->Components->enabled('Auth')) { + $this->Components->disable('Auth'); + } + if ($this->Components->enabled('Security')) { + $this->Components->disable('Security'); + } $this->startupProcess(); $this->_set(array('cacheAction' => false, 'viewPath' => 'Errors')); - if (isset($this->RequestHandler)) { - $this->RequestHandler->startup($this); - } } /** diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 22b691362b2..6f215410699 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -264,10 +264,6 @@ public function initialize(Controller $controller) { * @return boolean */ public function startup(Controller $controller) { - if ($controller->name == 'CakeError') { - return true; - } - $methods = array_flip(array_map('strtolower', $controller->methods)); $action = strtolower($controller->request->params['action']); diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index 5011fe8eb37..1617c46a12b 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -205,10 +205,6 @@ class SecurityComponent extends Component { * @return void */ public function startup(Controller $controller) { - if ($controller->name == 'CakeError') { - return true; - } - $this->request = $controller->request; $this->_action = $this->request->params['action']; $this->_methodsRequired($controller);