From bf4c16312920b719178258ed876ee86a63e96eb4 Mon Sep 17 00:00:00 2001 From: Matt Pinkston Date: Fri, 19 Oct 2012 14:08:19 -0500 Subject: [PATCH] Split out if statement, updated controller url plugin. --- src/Helper/Url.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Helper/Url.php b/src/Helper/Url.php index a6752fe0..3b2af126 100644 --- a/src/Helper/Url.php +++ b/src/Helper/Url.php @@ -102,10 +102,13 @@ public function __invoke($name = null, array $params = array(), $options = array if (isset($routeMatchParams[ModuleRouteListener::ORIGINAL_CONTROLLER])) { $routeMatchParams['controller'] = $routeMatchParams[ModuleRouteListener::ORIGINAL_CONTROLLER]; - unset($routeMatchParams[ModuleRouteListener::MODULE_NAMESPACE]); unset($routeMatchParams[ModuleRouteListener::ORIGINAL_CONTROLLER]); } + if (isset($routeMatchParams[ModuleRouteListener::MODULE_NAMESPACE])) { + unset($routeMatchParams[ModuleRouteListener::MODULE_NAMESPACE]); + } + $params = array_merge($routeMatchParams, $params); }