From: Tim Düsterhus Date: Wed, 1 Jun 2022 14:58:32 +0000 (+0200) Subject: Revert "Revert "Reject empty `controller` in ControllerMap::resolveCustomController()"" X-Git-Tag: 6.0.0_Alpha_1~1218^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f15ca3acb4f4aa8e5af830dfa0dd72354655a18f;p=GitHub%2FWoltLab%2FWCF.git Revert "Revert "Reject empty `controller` in ControllerMap::resolveCustomController()"" This check will now work correctly, since the custom URL for non-i18n pages is no longer cleared since the previous commit. This reverts commit bd46b32207b5784c481277f4c2a8c81deff49f9c. --- diff --git a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php index 011a3bf1f9..f5f1aa70bb 100644 --- a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php +++ b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php @@ -141,6 +141,10 @@ class ControllerMap extends SingletonFactory */ public function resolveCustomController($application, $controller) { + if ($controller === '') { + throw new \InvalidArgumentException('The given controller must not be empty.'); + } + if (isset($this->applicationOverrides['lookup'][$application][$controller])) { $application = $this->applicationOverrides['lookup'][$application][$controller]; }