Skip to content

Commit 4c98541

Browse files
committed
fix: undefined array key for default controller
Signed-off-by: otengkwame <[email protected]>
1 parent d6faac4 commit 4c98541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeIgniter/Framework/core/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ protected function _set_default_controller()
302302
if (
303303
$this->default_controller !== 'app'
304304
&& $this->default_controller !== 'app/index'
305-
&& str_contains($this->routes[$defaultController], 'prefix-route')
305+
&& str_contains($this->routes[$defaultController] ?? 'app', 'prefix-route')
306306
) {
307307
$baseUrl = $this->config->config['base_url'];
308308
// Redirect to the set default_controller with the base_url

0 commit comments

Comments
 (0)