Skip to content

Commit

Permalink
Check if RouteList has no module [Closes #27]
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Jun 14, 2015
1 parent 10112b2 commit e3a1907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Kdyby/Console/CliRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}

Expand Down

0 comments on commit e3a1907

Please sign in to comment.