Skip to content

Commit

Permalink
Merge branch 'master' into contao413
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Nov 3, 2022
2 parents 21b1daa + ef759f0 commit 3d999ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/TagHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ private function getTagsForTableAndId($table, $id, $url = false, $max_tags = 0,
}
if (strlen($target))
{
$pageObj = new PageModel();
$pageObj = $pageObj::findPublishedByIdOrAlias($target);
if (!empty($pageObj))
$pageModel = new PageModel();
$pageModel = $pageModel::findPublishedByIdOrAlias($target);
if (!empty($pageModel))
{
foreach ($arrTags as $idx => $tag)
{
$arrTags[$idx]['url'] = StringUtil::ampersand($pageObj->getFrontendUrl('/tag/' . $tag['tag']));
$arrTags[$idx]['url'] = StringUtil::ampersand($pageModel->current()->getFrontendUrl('/tag/' . $tag['tag']));
}
}
}
Expand Down

0 comments on commit 3d999ce

Please sign in to comment.