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.
This commit is contained in:
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;
|
||||
$this->view->setController($this->controller);
|
||||
}
|
||||
} catch (EventException $e) {
|
||||
throw new RouterException("Could not load view. routerCallViewEvent threw exception: '".$e->getMessage()."'");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user