dirname problem

https://github.com/FreshRSS/FreshRSS/issues/906
This commit is contained in:
Alexandre Alapetite committed 2015-07-17 23:43:43 +02:00
1 parent 9cc0ef231c
commit 2d22bf300a
1 file changed
+4 -1
+4 -1
View File
@@ -100,7 +100,10 @@ class Minz_Request {
} else {
$url .= '://' . $host . ($port == 80 ? '' : ':' . $port);
}
$url .= isset($_SERVER['REQUEST_URI']) ? dirname($_SERVER['REQUEST_URI']) : '';
if (isset($_SERVER['REQUEST_URI'])) {
$path = $_SERVER['REQUEST_URI'];
$url .= substr($path, -1) === '/' ? substr($path, 0, -1) : dirname($path);
}
} else {
$url = rtrim($url, '/\\') . $baseUrlSuffix;
}