Don't set controller if an empty segments array.

This commit is contained in:
Lonnie Ezell 2015-11-27 23:27:49 -06:00
parent 5b62fad76c
commit def2ec6498

View File

@ -247,9 +247,11 @@ class Router implements RouterInterface
{ {
$this->setDefaultController(); $this->setDefaultController();
} }
// If not empty, then the first segment should be the controller // 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. // Use the method name if it exists.
// If it doesn't, no biggie - the default method name // If it doesn't, no biggie - the default method name