Skip to content

Commit

Permalink
Avoid calling the same method twice
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Mar 16, 2015
1 parent d3e92fa commit a7a8c71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/Plugin/Menu.php
Expand Up @@ -78,11 +78,12 @@ protected function urlForDefaultAction($additionalParams = array())
*/
protected function urlForAction($controllerAction, $additionalParams = array())
{
$this->checkisValidCallable($this->getModule(), $controllerAction);
$module = $this->getModule();
$this->checkisValidCallable($module, $controllerAction);

$params = (array) $additionalParams;
$params['action'] = $controllerAction;
$params['module'] = $this->getModule();
$params['module'] = $module;

return $params;
}
Expand Down

0 comments on commit a7a8c71

Please sign in to comment.