File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1928,12 +1928,12 @@ protected function prepareBaseUrl()
1928
1928
*/
1929
1929
protected function prepareBasePath ()
1930
1930
{
1931
- $ filename = basename ($ this ->server ->get ('SCRIPT_FILENAME ' ));
1932
1931
$ baseUrl = $ this ->getBaseUrl ();
1933
1932
if (empty ($ baseUrl )) {
1934
1933
return '' ;
1935
1934
}
1936
1935
1936
+ $ filename = basename ($ this ->server ->get ('SCRIPT_FILENAME ' ));
1937
1937
if (basename ($ baseUrl ) === $ filename ) {
1938
1938
$ basePath = dirname ($ baseUrl );
1939
1939
} else {
@@ -1954,8 +1954,6 @@ protected function prepareBasePath()
1954
1954
*/
1955
1955
protected function preparePathInfo ()
1956
1956
{
1957
- $ baseUrl = $ this ->getBaseUrl ();
1958
-
1959
1957
if (null === ($ requestUri = $ this ->getRequestUri ())) {
1960
1958
return '/ ' ;
1961
1959
}
@@ -1968,12 +1966,14 @@ protected function preparePathInfo()
1968
1966
$ requestUri = '/ ' .$ requestUri ;
1969
1967
}
1970
1968
1969
+ if (null === ($ baseUrl = $ this ->getBaseUrl ())) {
1970
+ return $ requestUri ;
1971
+ }
1972
+
1971
1973
$ pathInfo = substr ($ requestUri , strlen ($ baseUrl ));
1972
- if (null !== $ baseUrl && ( false === $ pathInfo || '' === $ pathInfo) ) {
1974
+ if (false === $ pathInfo || '' === $ pathInfo ) {
1973
1975
// If substr() returns false then PATH_INFO is set to an empty string
1974
1976
return '/ ' ;
1975
- } elseif (null === $ baseUrl ) {
1976
- return $ requestUri ;
1977
1977
}
1978
1978
1979
1979
return (string ) $ pathInfo ;
You can’t perform that action at this time.
0 commit comments