diff options
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/app.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 61f639953ec..68869df5721 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -616,7 +616,7 @@ class OC_App { * * @return string */ - public static function getCurrentApp() { + public static function getCurrentApp(): string { $request = \OC::$server->getRequest(); $script = substr($request->getScriptName(), strlen(OC::$WEBROOT) + 1); $topFolder = substr($script, 0, strpos($script, '/') ?: 0); @@ -628,7 +628,7 @@ class OC_App { } if ($topFolder == 'apps') { $length = strlen($topFolder); - return substr($script, $length + 1, strpos($script, '/', $length + 1) - $length - 1); + return substr($script, $length + 1, strpos($script, '/', $length + 1) - $length - 1) ?: ''; } else { return $topFolder; } |