Simplify `isset()` check in ControllerMap::resolveCustomController()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 1 Jun 2022 08:50:18 +0000 (10:50 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 1 Jun 2022 08:51:02 +0000 (10:51 +0200)
The first test was a prefix of the second, thus it is implicitly checked.

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

index bb78285b5c4156a55a9e1186aec855a9ca0009d5..d76adf31095be442b38fb6ce7caf52bbb4f936b0 100644 (file)
@@ -145,10 +145,7 @@ class ControllerMap extends SingletonFactory
             $application = $this->applicationOverrides['lookup'][$application][$controller];
         }
 
-        if (
-            isset($this->customUrls['lookup'][$application])
-            && isset($this->customUrls['lookup'][$application][$controller])
-        ) {
+        if (isset($this->customUrls['lookup'][$application][$controller])) {
             $data = $this->customUrls['lookup'][$application][$controller];
             if (\preg_match('~^__WCF_CMS__(?P<pageID>\d+)-(?P<languageID>\d+)$~', $data, $matches)) {
                 return [