Simplify `isset()` check in ControllerMap::isDefaultController()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 1 Jun 2022 07:47:05 +0000 (09:47 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 1 Jun 2022 07:47:05 +0000 (09:47 +0200)
The first parameter was a prefix of the second, thus it is implicitly checked.

wcfsetup/install/files/lib/system/request/ControllerMap.class.php

index 95e5d3455dfb0883366ff0b5369a5b6b71787f1d..bb78285b5c4156a55a9e1186aec855a9ca0009d5 100644 (file)
@@ -302,7 +302,7 @@ class ControllerMap extends SingletonFactory
     public function isDefaultController($application, $controller)
     {
         // lookup custom urls first
-        if (isset($this->customUrls['lookup'][$application], $this->customUrls['lookup'][$application][$controller])) {
+        if (isset($this->customUrls['lookup'][$application][$controller])) {
             $controller = $this->customUrls['lookup'][$application][$controller];
             if (\preg_match('~^(?P<controller>__WCF_CMS__\d+)(?:-(?P<languageID>\d+))?$~', $controller, $matches)) {
                 if (