Skip to content

Commit fa8b9f2

Browse files
committed
Merge branch '7.3' into 7.4
* 7.3: Fix Warning: curl_multi_select(): timeout must be positive [PropertyInfo] Fix ReflectionExtractor handling of underscore-only property names ObjectNormalizer: allow null and scalar [Security] Fix `HttpUtils::createRequest()` when the context’s base URL isn’t empty [Serializer] fix Inherited properties normalization [OptionsResolver] Fix missing prototype key in nested error paths Bump Symfony version to 7.3.8 Update VERSION for 7.3.7 Update CHANGELOG for 7.3.7 Bump Symfony version to 6.4.30 Update VERSION for 6.4.29 Update CHANGELOG for 6.4.29 [Yaml] Fix parsing of unquoted multiline scalars with comments or blank lines [Clock] Align MockClock::sleep() behavior with NativeClock for negative values [OptionsResolver] Ensure remove() also unsets deprecation status Remove review state for Belarusian translations (entries 141 and 142) [ExpressionLanguage] Compile numbers with var_export in Compiler::repr for thread-safety compatibility with ext-redis 6.3 [Serializer] Fix BackedEnumNormalizer behavior with partial denormalization [HttpFoundation] Fix parsing pathinfo with no leading slash
2 parents a696cb0 + db488a6 commit fa8b9f2

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Request.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,9 +2025,8 @@ protected function preparePathInfo(): string
20252025
}
20262026

20272027
$pathInfo = substr($requestUri, \strlen($baseUrl));
2028-
if ('' === $pathInfo) {
2029-
// If substr() returns false then PATH_INFO is set to an empty string
2030-
return '/';
2028+
if ('' === $pathInfo || '/' !== $pathInfo[0]) {
2029+
return '/'.$pathInfo;
20312030
}
20322031

20332032
return $pathInfo;

Tests/RequestTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,6 +1960,16 @@ public static function getBaseUrlData()
19601960
'',
19611961
'/foo/api/bar',
19621962
],
1963+
[
1964+
'/api/index.phpfoo',
1965+
[
1966+
'SCRIPT_FILENAME' => '/var/www/api/index.php',
1967+
'SCRIPT_NAME' => '/api/index.php',
1968+
'PHP_SELF' => '/api/index.php',
1969+
],
1970+
'/api/index.php',
1971+
'/foo',
1972+
],
19631973
];
19641974
}
19651975

0 commit comments

Comments
 (0)