Simplify extraction of abbreviation for active application check
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 10:04:55 +0000 (12:04 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 6 Jul 2021 10:14:16 +0000 (12:14 +0200)
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

index 323ec40b98c1f9a76bee1fe9749f017494ddf906..ecb4c514f20e9089b6a1b478880a059544224775 100644 (file)
@@ -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);
         }