From: Tim Düsterhus Date: Tue, 6 Jul 2021 10:04:55 +0000 (+0200) Subject: Simplify extraction of abbreviation for active application check X-Git-Tag: 5.5.0_Alpha_1~555 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e91cf91a30f254a2746a5cb1d7e271e39f94f2e9;p=GitHub%2FWoltLab%2FWCF.git Simplify extraction of abbreviation for active application check --- diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index 323ec40b98..ecb4c514f2 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -135,7 +135,7 @@ class ApplicationHandler extends SingletonFactory $request = RequestHandler::getInstance()->getActiveRequest(); if ($request !== null) { - $abbreviation = \substr($request->getClassName(), 0, \mb_strpos($request->getClassName(), '\\')); + [$abbreviation] = \explode('\\', $request->getClassName(), 2); return $this->getApplication($abbreviation); }