Fix error in event results if team was deleted

This commit is contained in:
Brian Miyaji
2017-01-15 10:01:59 +11:00
parent da12f410fb
commit 151ad04fca
2 changed files with 5 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ foreach( $data as $team_id => $result ):
$team_name = sp_get_team_name( $team_id, $abbreviate_teams );
if ( $link_teams ):
if ( $link_teams && sp_post_exists( $team_id ) ):
$team_name = '<a href="' . get_post_permalink( $team_id ) . '">' . $team_name . '</a>';
endif;