Skip to content

Commit 86b949a

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: (22 commits) 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 [FrameworkBundle] Update deprecation message for collect_serializer_data run test using a read-only directory on Windows too [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 ...
2 parents 1884e99 + fa8b9f2 commit 86b949a

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
@@ -1983,9 +1983,8 @@ protected function preparePathInfo(): string
19831983
}
19841984

19851985
$pathInfo = substr($requestUri, \strlen($baseUrl));
1986-
if ('' === $pathInfo) {
1987-
// If substr() returns false then PATH_INFO is set to an empty string
1988-
return '/';
1986+
if ('' === $pathInfo || '/' !== $pathInfo[0]) {
1987+
return '/'.$pathInfo;
19891988
}
19901989

19911990
return $pathInfo;

Tests/RequestTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,16 @@ public static function getBaseUrlData()
19111911
'',
19121912
'/foo/api/bar',
19131913
],
1914+
[
1915+
'/api/index.phpfoo',
1916+
[
1917+
'SCRIPT_FILENAME' => '/var/www/api/index.php',
1918+
'SCRIPT_NAME' => '/api/index.php',
1919+
'PHP_SELF' => '/api/index.php',
1920+
],
1921+
'/api/index.php',
1922+
'/foo',
1923+
],
19141924
];
19151925
}
19161926

0 commit comments

Comments
 (0)