Skip to content
This repository
Browse code

Avoid duplicating RequestHandler component.

  • Loading branch information...
commit d269588e78ce0b20e986136a598e548bdfabe3aa 1 parent 528671f
Ber Clausen authored October 25, 2012
6  lib/Cake/Controller/CakeErrorController.php
@@ -50,7 +50,11 @@ class CakeErrorController extends AppController {
50 50
  */
51 51
 	public function __construct($request = null, $response = null) {
52 52
 		parent::__construct($request, $response);
53  
-		if (count(Router::extensions())) {
  53
+		if (
  54
+			count(Router::extensions()) &&
  55
+			!array_key_exists('RequestHandler', $this->components) &&
  56
+			!in_array('RequestHandler', $this->components, true)
  57
+		) {
54 58
 			$this->components[] = 'RequestHandler';
55 59
 		}
56 60
 		$this->constructClasses();

0 notes on commit d269588

Please sign in to comment.
Something went wrong with that request. Please try again.