diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-01-12 16:55:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 16:55:27 +0100 |
commit | 15bbf087744a0f535574e044861c527cb8b8ccf0 (patch) | |
tree | 6603a223c44f2720f982384d93c5d6ae2251ae3c | |
parent | 9d508a022e1823becc3e1284abca417ef2f71e62 (diff) | |
parent | e3c0fd68827fc3dc6082654ed9919b820dfbd74e (diff) | |
download | nextcloud-server-15bbf087744a0f535574e044861c527cb8b8ccf0.tar.gz nextcloud-server-15bbf087744a0f535574e044861c527cb8b8ccf0.zip |
Merge pull request #7816 from nextcloud/fix-strpos-for-current-app
Fix strpos if needle is not found
-rw-r--r-- | lib/private/legacy/app.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 1b9fc28873e..8114895416b 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -671,7 +671,7 @@ class OC_App { public static function getCurrentApp() { $request = \OC::$server->getRequest(); $script = substr($request->getScriptName(), strlen(OC::$WEBROOT) + 1); - $topFolder = substr($script, 0, strpos($script, '/')); + $topFolder = substr($script, 0, strpos($script, '/') ?: 0); if (empty($topFolder)) { $path_info = $request->getPathInfo(); if ($path_info) { |