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 @@ -1908,9 +1908,8 @@ protected function preparePathInfo(): string
19081908 }
19091909
19101910 $ pathInfo = substr ($ requestUri , \strlen ($ baseUrl ));
1911- if ('' === $ pathInfo ) {
1912- // If substr() returns false then PATH_INFO is set to an empty string
1913- return '/ ' ;
1911+ if ('' === $ pathInfo || '/ ' !== $ pathInfo [0 ]) {
1912+ return '/ ' .$ pathInfo ;
19141913 }
19151914
19161915 return $ pathInfo ;
Original file line number Diff line number Diff line change @@ -1903,6 +1903,16 @@ public static function getBaseUrlData()
19031903 '' ,
19041904 '/foo/api/bar ' ,
19051905 ],
1906+ [
1907+ '/api/index.phpfoo ' ,
1908+ [
1909+ 'SCRIPT_FILENAME ' => '/var/www/api/index.php ' ,
1910+ 'SCRIPT_NAME ' => '/api/index.php ' ,
1911+ 'PHP_SELF ' => '/api/index.php ' ,
1912+ ],
1913+ '/api/index.php ' ,
1914+ '/foo ' ,
1915+ ],
19061916 ];
19071917 }
19081918
You can’t perform that action at this time.
0 commit comments