Skip to content

Commit

Permalink
Merge pull request #776 from nextcloud/backport/775/stable22
Browse files Browse the repository at this point in the history
[stable22] Check if `$knownPath` is set before invoking `rtrim()`
  • Loading branch information
ArtificialOwl authored Aug 9, 2021
2 parents ee7c41b + ba1ae8f commit 0e4b9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/ConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0e4b9df

Please sign in to comment.