File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public function getPath($uri, $query_string = '')
80
80
$ path = substr ($ path , 0 , - strlen ($ query_string ) - 1 );
81
81
}
82
82
83
- if ($ path {0 } === '/ ' ) {
83
+ if (! empty ( $ path ) && $ path {0 } === '/ ' ) {
84
84
$ path = substr ($ path , 1 );
85
85
}
86
86
@@ -218,7 +218,6 @@ public function dispatch($uri, $query_string = '')
218
218
list ($ this ->controller , $ this ->action ) = $ this ->findRoute ($ this ->getPath ($ uri , $ query_string )); // TODO: add plugin for routes
219
219
$ plugin = '' ;
220
220
}
221
-
222
221
$ class = empty ($ plugin ) ? '\Controller \\' .ucfirst ($ this ->controller ) : '\Plugin \\' .ucfirst ($ plugin ).'\Controller \\' .ucfirst ($ this ->controller );
223
222
224
223
$ instance = new $ class ($ this ->container );
Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ public function open($base_path = '/')
45
45
ini_set ('session.use_only_cookies ' , '1 ' );
46
46
47
47
// Enable strict mode
48
- ini_set ('session.use_strict_mode ' , '1 ' );
48
+ if (version_compare (PHP_VERSION , '7.0.0 ' ) < 0 ) {
49
+ ini_set ('session.use_strict_mode ' , '1 ' );
50
+ }
49
51
50
52
// Ensure session ID integrity
51
53
ini_set ('session.entropy_file ' , '/dev/urandom ' );
You can’t perform that action at this time.
0 commit comments