diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ffc788..8a88642 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ Pico Changelog `PicoDeprecated`'s changelog. Please note that BC-breaking changes are only possible with a new major version. +### Version 2.0.2 +Released: - + +``` +* [Fixed] Support Windows paths (`\` instead of `/`) in `Pico::evaluateRequestUrl()` +``` + ### Version 2.0.1 Released: 2018-07-29 diff --git a/lib/Pico.php b/lib/Pico.php index bfa5be6..ce628d5 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1076,7 +1076,7 @@ class Pico // use REQUEST_URI (requires URL rewriting); e.g. /pico/sub/page if (($this->requestUrl === null) && $this->isUrlRewritingEnabled()) { $basePath = dirname($_SERVER['SCRIPT_NAME']); - $basePath = !in_array($basePath, array('.', '/'), true) ? $basePath . '/' : '/'; + $basePath = !in_array($basePath, array('.', '/', '\\'), true) ? $basePath . '/' : '/'; $basePathLength = strlen($basePath); $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';