Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r--core/UrlHelper.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/UrlHelper.php b/core/UrlHelper.php
index a0bc340bbd..78682acbfc 100644
--- a/core/UrlHelper.php
+++ b/core/UrlHelper.php
@@ -231,7 +231,10 @@ class UrlHelper
$parsedUrl = parse_url($url);
$result = '';
if (isset($parsedUrl['path'])) {
- $result .= substr($parsedUrl['path'], 1);
+ if (substr($parsedUrl['path'], 0, 1) == '/') {
+ $parsedUrl['path'] = substr($parsedUrl['path'], 1);
+ }
+ $result .= $parsedUrl['path'];
}
if (isset($parsedUrl['query'])) {
$result .= '?' . $parsedUrl['query'];