Router bugfix. Better checking wether or not the event has parameters

This commit is contained in:
Abel Hoogeveen 2015-02-24 14:33:09 +01:00
parent f894727e40
commit 455dbd0c97
1 changed files with 3 additions and 3 deletions

View File

@ -86,10 +86,10 @@ class Router extends Bus {
// Assign everything to the object to make it accessible, but let modules check it first
$this->route = $path;
$this->controllerName = $event->controller === null ? $this->config->main->default_controller : $event->controller;
$this->function = $event->function === null || empty($this->function) ? $this->config->main->default_function : $event->function;
$this->controllerName = ($event->controller === null || empty($event->controller) ? $this->config->main->default_controller : $event->controller);
$this->function = ($event->function === null || empty($event->function) ? $this->config->main->default_function : $event->function);
$this->parameters = $event->parameters;
$this->directory = $event->directory === null ? FUZEPATH . "/Application/Controller/" : $event->directory;
$this->directory = ($event->directory === null || empty($event->directory) ? FUZEPATH . "/Application/Controller/" : $event->directory);
// Load the controller
$this->loadController();