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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2018-01-25 00:48:40 +0300
committerGitHub <noreply@github.com>2018-01-25 00:48:40 +0300
commitdcd3b041d2e548d61f1d8cbbab7d502f61a08372 (patch)
tree0c9b98f9e95426f44a9f711be50f223dc90b2113 /core/Url.php
parent9c28dfe5c1ca4c5ae1087535ea8fc33001ebf65b (diff)
Only strip PATH_INFO when it is set to a value (#12500)
If PATH_INFO is defined, but empty, this line otherwise causes the URL to be rewritten incorrectly As reported in https://github.com/matomo-org/matomo/issues/6644#issuecomment-357399615
Diffstat (limited to 'core/Url.php')
-rw-r--r--core/Url.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Url.php b/core/Url.php
index 3451016a27..5b4009f42d 100644
--- a/core/Url.php
+++ b/core/Url.php
@@ -150,7 +150,7 @@ class Url
}
// strip path_info
- if ($removePathInfo && isset($_SERVER['PATH_INFO'])) {
+ if ($removePathInfo && !empty($_SERVER['PATH_INFO'])) {
$url = substr($url, 0, -strlen($_SERVER['PATH_INFO']));
}
}