Fix error in player list when team no longer exists

This commit is contained in:
Brian Miyaji
2016-09-26 14:59:28 +10:00
parent 9870f78ca8
commit 21d22a789c

View File

@@ -172,7 +172,7 @@ foreach ( $groups as $group ):
if ( array_key_exists( 'team', $labels ) ): if ( array_key_exists( 'team', $labels ) ):
$team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_team', true ) ); $team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_team', true ) );
$team_name = sp_get_team_name( $team, $abbreviate_teams ); $team_name = sp_get_team_name( $team, $abbreviate_teams );
if ( $link_teams ): if ( $link_teams && false !== get_post_status( $team )):
$team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>'; $team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>';
endif; endif;
$output .= '<td class="data-team">' . $team_name . '</td>'; $output .= '<td class="data-team">' . $team_name . '</td>';