File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -205,14 +205,17 @@ protected function _parse_request_uri()
205205 $ query = isset ($ uri ['query ' ]) ? $ uri ['query ' ] : '' ;
206206 $ uri = isset ($ uri ['path ' ]) ? $ uri ['path ' ] : '' ;
207207
208- if (!empty ($ _SERVER ['SCRIPT_NAME ' ]) && strpos ($ uri , $ _SERVER ['SCRIPT_NAME ' ]) === 0 )
209- {
210- $ uri = (string ) substr ($ uri , strlen ($ _SERVER ['SCRIPT_NAME ' ]));
211- }
212- elseif (!empty ($ _SERVER ['SCRIPT_NAME ' ]) && strpos ($ uri , dirname ($ _SERVER ['SCRIPT_NAME ' ])) === 0 )
213- {
214- $ uri = (string ) substr ($ uri , strlen (dirname ($ _SERVER ['SCRIPT_NAME ' ])));
215- }
208+ if (isset ($ _SERVER ['SCRIPT_NAME ' ][0 ]))
209+ {
210+ if (strpos ($ uri , $ _SERVER ['SCRIPT_NAME ' ]) === 0 )
211+ {
212+ $ uri = (string ) substr ($ uri , strlen ($ _SERVER ['SCRIPT_NAME ' ]));
213+ }
214+ elseif (strpos ($ uri , dirname ($ _SERVER ['SCRIPT_NAME ' ])) === 0 )
215+ {
216+ $ uri = (string ) substr ($ uri , strlen (dirname ($ _SERVER ['SCRIPT_NAME ' ])));
217+ }
218+ }
216219
217220 // This section ensures that even on servers that require the URI to be in the query string (Nginx) a correct
218221 // URI is found, and also fixes the QUERY_STRING server var and $_GET array.
You can’t perform that action at this time.
0 commit comments