Skip to content

Commit

Permalink
Remove fallback to site
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Jan 2, 2022
1 parent 166853f commit b71a712
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libraries/src/Application/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,11 @@ public function setName(string $name): void
*/
public static function getRouter($name = null, array $options = array())
{
if (!isset($name))
if (empty($name))
{
throw new InvalidArgumentException('A router name must be set in console application.');
}

// Fallback to site router when console router is requested
if (Factory::getApplication()->getName() === $name)
{
$name = 'site';
}

$options['mode'] = Factory::getApplication()->get('sef');

return Router::getInstance($name, $options);
Expand Down

0 comments on commit b71a712

Please sign in to comment.