diff --git a/classes/top10view.class.php b/classes/top10view.class.php
index d13ea961..be49a963 100644
--- a/classes/top10view.class.php
+++ b/classes/top10view.class.php
@@ -43,14 +43,16 @@ private static function get_selected_link($String, $Selected) {
}
public static function render_artist_tile($Artist, $Category) {
- switch ($Category) {
+ if (self::is_valid_artist($Artist)) {
+ switch ($Category) {
- case 'weekly':
- case 'hyped':
- self::render_tile("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']);
- break;
- default:
- break;
+ case 'weekly':
+ case 'hyped':
+ self::render_tile("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']);
+ break;
+ default:
+ break;
+ }
}
}
@@ -69,14 +71,16 @@ private static function render_tile($Url, $Name, $Image) {
public static function render_artist_list($Artist, $Category) {
- switch ($Category) {
-
- case 'weekly':
- case 'hyped':
- self::render_list("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']);
- break;
- default:
- break;
+ if (self::is_valid_artist($Artist)) {
+ switch ($Category) {
+
+ case 'weekly':
+ case 'hyped':
+ self::render_list("artist.php?artistname=", $Artist['name'], $Artist['image'][3]['#text']);
+ break;
+ default:
+ break;
+ }
}
}
@@ -94,4 +98,8 @@ private static function render_list($Url, $Name, $Image) {
}
}
+ private static function is_valid_artist($Artist) {
+ return $Artist['name'] != '[unknown]';
+ }
+
}
diff --git a/sections/login/login.php b/sections/login/login.php
index 98c37a02..27550764 100644
--- a/sections/login/login.php
+++ b/sections/login/login.php
@@ -59,9 +59,10 @@
if ($Attempts > 0) {
?>
- Lost your password? Recover it here!
+ Lost your password? Recover it here!
-} ?>
+}
+?>