aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/URLGenerator.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 167690f3a6e..1fb69031f03 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -94,8 +94,9 @@ class URLGenerator implements IURLGenerator {
public function linkToOCSRouteAbsolute(string $routeName, array $arguments = []): string {
$route = \OC::$server->getRouter()->generate('ocs.'.$routeName, $arguments, false);
- if (strpos($route, '/index.php') === 0) {
- $route = substr($route, 10);
+ $indexPhpPos = strpos($route, '/index.php/');
+ if ($indexPhpPos !== false) {
+ $route = substr($route, $indexPhpPos + 10);
}
$route = substr($route, 7);