diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 160b8cdeb..60b1163fb 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -694,7 +694,7 @@ public function linkToRoute(string $route, array $args): string { $knownPath = OC::$WEBROOT; } - $knownPath = rtrim($knownPath, '/'); + $knownPath = $knownPath ? rtrim($knownPath, '/') : ''; if ($knownPath === '') { return $path; }