diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 84b3a69ade..3b31d8e593 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1790,7 +1790,8 @@ class Request $requestUri = substr($requestUri, 0, $pos); } - if (null !== $baseUrl && false === $pathInfo = substr($requestUri, strlen($baseUrl))) { + $pathInfo = substr($requestUri, strlen($baseUrl)); + if (null !== $baseUrl && (false === $pathInfo || '' === $pathInfo)) { // If substr() returns false then PATH_INFO is set to an empty string return '/'; } elseif (null === $baseUrl) {