Use this:
function MostVotedAllTime_Widget() {
$a = SortVotes();
//Before
?>
<div class="JibbleChart">
<div class="title">Most Recommended Albums</div>
<?php
$rows = 0;
//Now does not include deleted posts
$i = 0;
while ($rows < get_option('voteiu_widgetcount')) {
if ($a[0][$i][0] != '') {
$postdat = get_post($a[0][$i][0]);
if (!empty($postdat)) {
$rows++;
if (round($rows / 2) == ($rows / 2)) {
echo '<div class="fore">';
} else {
echo '<div class="back">';
}
echo get_the_term_list( $postdat->ID, 'artist', ' ', ', ', '' );
echo ' - <a href="'.$postdat->guid.'" title="'.$postdat->post_title.'">'.$i.' - '.$postdat->post_title.'</a>';
echo '</div>';
}
}
if ($i < count($a[0])) {
$i++;
} else {
break; //exit the loop
}
}
//End
?>
</div>
<?php
}