From 4b8dbaec49a2b08529b99935df49009834cd901f Mon Sep 17 00:00:00 2001 From: savvasha Date: Mon, 20 Aug 2018 18:14:39 +0300 Subject: [PATCH] Filter teams arrays to remove any 0 or null values --- templates/player-details.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/player-details.php b/templates/player-details.php index 81560b95..46897b27 100644 --- a/templates/player-details.php +++ b/templates/player-details.php @@ -71,7 +71,7 @@ endif; $data = array_merge( $metrics_before, $common, $metrics_after ); if ( $show_current_teams ): - $current_teams = $player->current_teams(); + $current_teams = array_filter( $player->current_teams() ); if ( $current_teams ): $teams = array(); foreach ( $current_teams as $team ): @@ -84,7 +84,7 @@ if ( $show_current_teams ): endif; if ( $show_past_teams ): - $past_teams = $player->past_teams(); + $past_teams = array_filter( $player->past_teams() ); if ( $past_teams ): $teams = array(); foreach ( $past_teams as $team ):