From 21d22a789c31f0f52e6dcda7f70a9663e533800c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 26 Sep 2016 14:59:28 +1000 Subject: [PATCH] Fix error in player list when team no longer exists --- templates/player-list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/player-list.php b/templates/player-list.php index a0cac27d..664f11bf 100644 --- a/templates/player-list.php +++ b/templates/player-list.php @@ -172,7 +172,7 @@ foreach ( $groups as $group ): if ( array_key_exists( 'team', $labels ) ): $team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_team', true ) ); $team_name = sp_get_team_name( $team, $abbreviate_teams ); - if ( $link_teams ): + if ( $link_teams && false !== get_post_status( $team )): $team_name = '' . $team_name . ''; endif; $output .= '' . $team_name . '';