File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 29
29
*/
30
30
class Router
31
31
{
32
- const VERSION = '3.0.5.pre.0 ' ;
32
+ const VERSION = '3.0.5.pre.1 ' ;
33
33
34
34
private $ control = '' ;
35
35
private $ forceSlash = false ;
@@ -46,8 +46,6 @@ class Router
46
46
*/
47
47
public function __construct ()
48
48
{
49
- /** @noinspection PhpExpressionResultUnusedInspection */
50
- $ _SERVER ; // Bypass auto_globals_jit and populate _SERVER into GLOBALS
51
49
// Get the Base of the URI, without 'index.php'
52
50
$ this ->uriBase = strtr ($ this ->getServer ('SCRIPT_NAME ' ), ['index.php ' => '' ]);
53
51
// make Relative URI - remove query string from the request (everything after ?)
@@ -60,6 +58,11 @@ public function __construct()
60
58
$ this ->uri = $ this ->getUriArray ($ this ->uriRelative );
61
59
// directory depth of current request
62
60
$ this ->uriCount = count ($ this ->uri );
61
+ // If needed, Bypass directive auto_globals_jit
62
+ if (!isset ($ GLOBALS ['_SERVER ' ])) {
63
+ /** @noinspection PhpExpressionResultUnusedInspection */
64
+ $ _SERVER ; // force compiler to populate _SERVER into GLOBALS
65
+ }
63
66
}
64
67
65
68
/**
You can’t perform that action at this time.
0 commit comments