Fixed a bug where the default blank album cover was not showing if lastfm was did not return one.

This commit is contained in:
Andrew Tomaka 2011-10-27 12:52:15 -04:00
parent 529fcdc81d
commit 0eba9f5417

View file

@ -86,7 +86,7 @@ while($link = $links->fetch_object()) {
<table class="formatting"> <table class="formatting">
<tr> <tr>
<td class="formatting"> <td class="formatting">
<img src="<?php echo $data->lastfm->cover; ?>" class="cover" alt="<?php echo $data->lastfm->artist ?> - <?php echo $data->lastfm->song ?>"/> <img src="<?php echo (isset($data->lastfm->cover) && !empty($data->lastfm->cover)) ? $data->lastfm->cover : '/img/album.png'; ?>" class="cover" alt="<?php echo $data->lastfm->artist ?> - <?php echo $data->lastfm->song ?>"/>
</td> </td>
<td class="top"> <td class="top">
<span class="right"><a href="http://last.fm/user/atomaka"><img src="img/badges/lastfm.png" class="icon" alt="Andrew Tomaka's Last.fm" /></a></span> <span class="right"><a href="http://last.fm/user/atomaka"><img src="img/badges/lastfm.png" class="icon" alt="Andrew Tomaka's Last.fm" /></a></span>