Skip to content

Commit

Permalink
Avoid duplicating RequestHandler component.
Browse files Browse the repository at this point in the history
  • Loading branch information
bar committed Oct 25, 2012
1 parent 528671f commit d269588
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -50,7 +50,11 @@ class CakeErrorController extends AppController {
*/
public function __construct($request = null, $response = null) {
parent::__construct($request, $response);
if (count(Router::extensions())) {
if (
count(Router::extensions()) &&
!array_key_exists('RequestHandler', $this->components) &&
!in_array('RequestHandler', $this->components, true)
) {
$this->components[] = 'RequestHandler';
}
$this->constructClasses();
Expand Down

0 comments on commit d269588

Please sign in to comment.