Fixed bug where controller was not changed after a routerCallViewEvent

Router::defaultCallable did not change the controller in the view upon a change in the RouterCallViewEvent.
This has been remedied by adding a check and performing the change when that check results in a discrepency.
master 1.2.1
Abel Hoogeveen 3 years ago
parent cd1e19e784
commit e30d4ad366

@ -371,7 +371,11 @@ class Router
// Reset vars
$this->view = $event->view;
$this->controller = $event->controller;
if ($this->controller !== $event->controller)
$this->controller = $event->controller;
} catch (EventException $e) {
throw new RouterException("Could not load view. routerCallViewEvent threw exception: '".$e->getMessage()."'");