File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1933,9 +1933,8 @@ protected function preparePathInfo(): string
19331933 }
19341934
19351935 $ pathInfo = substr ($ requestUri , \strlen ($ baseUrl ));
1936- if (false === $ pathInfo || '' === $ pathInfo ) {
1937- // If substr() returns false then PATH_INFO is set to an empty string
1938- return '/ ' ;
1936+ if (false === $ pathInfo || '' === $ pathInfo || '/ ' !== $ pathInfo [0 ]) {
1937+ return '/ ' .$ pathInfo ;
19391938 }
19401939
19411940 return $ pathInfo ;
Original file line number Diff line number Diff line change @@ -1904,6 +1904,16 @@ public static function getBaseUrlData()
19041904 '' ,
19051905 '/foo/api/bar ' ,
19061906 ],
1907+ [
1908+ '/api/index.phpfoo ' ,
1909+ [
1910+ 'SCRIPT_FILENAME ' => '/var/www/api/index.php ' ,
1911+ 'SCRIPT_NAME ' => '/api/index.php ' ,
1912+ 'PHP_SELF ' => '/api/index.php ' ,
1913+ ],
1914+ '/api/index.php ' ,
1915+ '/foo ' ,
1916+ ],
19071917 ];
19081918 }
19091919
You can’t perform that action at this time.
0 commit comments