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 @@ -1983,9 +1983,8 @@ protected function preparePathInfo()
19831983 }
19841984
19851985 $ pathInfo = substr ($ requestUri , \strlen ($ baseUrl ));
1986- if (false === $ pathInfo || '' === $ pathInfo ) {
1987- // If substr() returns false then PATH_INFO is set to an empty string
1988- return '/ ' ;
1986+ if (false === $ pathInfo || '' === $ pathInfo || '/ ' !== $ pathInfo [0 ]) {
1987+ return '/ ' .$ pathInfo ;
19891988 }
19901989
19911990 return $ pathInfo ;
Original file line number Diff line number Diff line change @@ -1876,6 +1876,16 @@ public static function getBaseUrlData()
18761876 '' ,
18771877 '/foo/api/bar ' ,
18781878 ],
1879+ [
1880+ '/api/index.phpfoo ' ,
1881+ [
1882+ 'SCRIPT_FILENAME ' => '/var/www/api/index.php ' ,
1883+ 'SCRIPT_NAME ' => '/api/index.php ' ,
1884+ 'PHP_SELF ' => '/api/index.php ' ,
1885+ ],
1886+ '/api/index.php ' ,
1887+ '/foo ' ,
1888+ ],
18791889 ];
18801890 }
18811891
You can’t perform that action at this time.
0 commit comments