From 1809180d41e22cf8b97b2d8bf0f2b4fa68f39dbf Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Tue, 24 Jul 2018 15:46:23 +0000 Subject: [PATCH] Internal: Portal: Fix router API that was never returning the right route. SVN:trunk[5970] --- .../portal/src/routers/abstractrouter.class.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/src/routers/abstractrouter.class.inc.php b/datamodels/2.x/itop-portal-base/portal/src/routers/abstractrouter.class.inc.php index f24dbe3eb..e983a08c3 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/routers/abstractrouter.class.inc.php +++ b/datamodels/2.x/itop-portal-base/portal/src/routers/abstractrouter.class.inc.php @@ -24,8 +24,10 @@ use Silex\Application; /** * AbstractRouter class is where URLs are defined with their callback, parameters and constraints (assertions). * It allows us to have URL pattern at one place only and to generate them anywhere in the code, avoiding to maintain URLs in multiple places. - * + * + * @package \Combodo\iTop\Portal\Router * @author Guillaume Lajarige + * @since 2.3.0 */ abstract class AbstractRouter { @@ -59,7 +61,9 @@ abstract class AbstractRouter * Throws an exception if not found. * * @param string $name + * * @return array + * * @throws \Exception */ static function GetRoute($name) @@ -82,7 +86,7 @@ abstract class AbstractRouter throw new \Exception('Unknown route "' . $name . '" for ' . get_class() . ''); } - return $aRoute; + return $aFoundRoute; } /**