mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Don't set controller if an empty segments array.
This commit is contained in:
parent
5b62fad76c
commit
def2ec6498
@ -247,9 +247,11 @@ class Router implements RouterInterface
|
||||
{
|
||||
$this->setDefaultController();
|
||||
}
|
||||
|
||||
// If not empty, then the first segment should be the controller
|
||||
$this->controller = ucfirst($segments[0]);
|
||||
else
|
||||
{
|
||||
$this->controller = ucfirst($segments[0]);
|
||||
}
|
||||
|
||||
// Use the method name if it exists.
|
||||
// If it doesn't, no biggie - the default method name
|
||||
|
Loading…
x
Reference in New Issue
Block a user