diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 89b2ca6cf..d3147af00 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -123,11 +123,10 @@ class RequestHandlerComponent extends Component { * and the requested mime-types, RequestHandler::$ext is set to that value. * * @param Controller $controller A reference to the controller - * @param array $settings Array of settings to _set(). * @return void * @see Router::parseExtensions() */ - public function initialize(Controller $controller, $settings = array()) { + public function initialize(Controller $controller) { if (isset($this->request->params['ext'])) { $this->ext = $this->request->params['ext']; } @@ -135,9 +134,8 @@ class RequestHandlerComponent extends Component { $this->_setExtension(); } $this->params = $controller->params; - $this->_set($settings); - if (!empty($settings['viewClassMap'])) { - $this->viewClassMap($settings['viewClassMap']); + if (!empty($this->settings['viewClassMap'])) { + $this->viewClassMap($this->settings['viewClassMap']); } } diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index ff3f98965..ca29f63b5 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -281,8 +281,8 @@ class RequestHandlerComponentTest extends CakeTestCase { * @return void */ public function testViewClassMap() { - $settings = array('viewClassMap' => array('json' => 'CustomJson')); - $this->RequestHandler->initialize($this->Controller, $settings); + $this->RequestHandler->settings = array('viewClassMap' => array('json' => 'CustomJson')); + $this->RequestHandler->initialize($this->Controller); $result = $this->RequestHandler->viewClassMap(); $expected = array( 'json' => 'CustomJson',