File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
src/Tqdev/PhpCrudApi/Middleware/Router Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -4812,14 +4812,11 @@ private function detectBasePath(string $basePath): string
4812
4812
if (isset ($ _SERVER ['PATH_INFO ' ])) {
4813
4813
$ fullPath = explode ('? ' , $ _SERVER ['REQUEST_URI ' ])[0 ];
4814
4814
$ path = $ _SERVER ['PATH_INFO ' ];
4815
- if (!$ path ) {
4816
- return $ _SERVER ['PHP_SELF ' ];
4817
- }
4818
4815
if (substr ($ fullPath , -1 * strlen ($ path )) == $ path ) {
4819
4816
return substr ($ fullPath , 0 , -1 * strlen ($ path ));
4820
4817
}
4821
4818
}
4822
- return ' / ' ;
4819
+ return $ _SERVER [ ' PHP_SELF ' ] ;
4823
4820
}
4824
4821
4825
4822
private function loadPathTree (): PathTree
Original file line number Diff line number Diff line change @@ -44,14 +44,11 @@ private function detectBasePath(string $basePath): string
44
44
if (isset ($ _SERVER ['PATH_INFO ' ])) {
45
45
$ fullPath = explode ('? ' , $ _SERVER ['REQUEST_URI ' ])[0 ];
46
46
$ path = $ _SERVER ['PATH_INFO ' ];
47
- if (!$ path ) {
48
- return $ _SERVER ['PHP_SELF ' ];
49
- }
50
47
if (substr ($ fullPath , -1 * strlen ($ path )) == $ path ) {
51
48
return substr ($ fullPath , 0 , -1 * strlen ($ path ));
52
49
}
53
50
}
54
- return ' / ' ;
51
+ return $ _SERVER [ ' PHP_SELF ' ] ;
55
52
}
56
53
57
54
private function loadPathTree (): PathTree
You can’t perform that action at this time.
0 commit comments