mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Avoid duplicating RequestHandler component.
This commit is contained in:
parent
528671f468
commit
d269588e78
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue