Merge pull request #7816 from nextcloud/fix-strpos-for-current-app
Fix strpos if needle is not found
This commit is contained in:
commit
15bbf08774
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue