Skip to content

Commit

Permalink
SEF URLs: Check if SEF plugin is published (#44283)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar authored Nov 3, 2024
1 parent 94bd619 commit cc82bbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/com_tags/src/Service/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ public function __construct(SiteApplication $app, AbstractMenu $menu, ?CategoryF
parent::__construct($app, $menu);

$sefPlugin = PluginHelper::getPlugin('system', 'sef');
$this->sefparams = new Registry($sefPlugin->params);

if ($sefPlugin) {
$this->sefparams = new Registry($sefPlugin->params);
} else {
$this->sefparams = new Registry();
}

$this->buildLookup();
}
Expand Down
7 changes: 6 additions & 1 deletion libraries/src/Component/Router/Rules/MenuRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ public function __construct(RouterView $router)
{
$this->router = $router;
$sefPlugin = PluginHelper::getPlugin('system', 'sef');
$this->sefparams = new Registry($sefPlugin->params);

if ($sefPlugin) {
$this->sefparams = new Registry($sefPlugin->params);
} else {
$this->sefparams = new Registry();
}

$this->buildLookup();
}
Expand Down

0 comments on commit cc82bbe

Please sign in to comment.