From 55e6549d7c267cbc68f0f793bb4f4f19787c4730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Proch=C3=A1zka?= Date: Sun, 14 Jun 2015 18:03:10 +0200 Subject: [PATCH] Check if RouteList has no module [Closes #27] --- src/Kdyby/Console/CliRouter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Kdyby/Console/CliRouter.php b/src/Kdyby/Console/CliRouter.php index f5c341c..9183d8b 100644 --- a/src/Kdyby/Console/CliRouter.php +++ b/src/Kdyby/Console/CliRouter.php @@ -123,10 +123,10 @@ public function constructUrl(Request $appRequest, Nette\Http\Url $refUrl) */ public static function prependTo(Nette\Application\IRouter &$router, self $cliRouter) { - if (!$router instanceof RouteList) { + if (!$router instanceof RouteList || $router->getModule()) { throw new Nette\Utils\AssertionException( 'If you want to use Kdyby/Console then your main router ' . - 'must be an instance of Nette\Application\Routers\RouteList' + 'must be an instance of Nette\Application\Routers\RouteList without module' ); }