BUGFIX: Error when no tags set

This commit is contained in:
mmk2410 2015-12-21 15:53:10 +01:00
parent a1d9e971e3
commit 23f9765b3a

View file

@ -93,12 +93,14 @@ class ArticleGenerator
echo "<span class='author'>$author</span>"; // print the author
}
foreach ($tags as $tag) {
$blogurl = filter_input(INPUT_GET, "blog");
if ($blogurl == "") { // on main blog. no ?blog=
echo "<a class='tag' href='./?tag=$tag'>$tag</a> ";
} else { // not on main blog
echo "<a class='tag' href='./?blog=$blog&tag=$tag'>$tag</a> ";
if (isset($tags)) {
foreach ($tags as $tag) {
$blogurl = filter_input(INPUT_GET, "blog");
if ($blogurl == "") { // on main blog. no ?blog=
echo "<a class='tag' href='./?tag=$tag'>$tag</a> ";
} else { // not on main blog
echo "<a class='tag' href='./?blog=$blog&tag=$tag'>$tag</a> ";
}
}
}