From 0b6f197e68730e859f9f53900f95381b9aaa1791 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 24 Sep 2015 19:37:26 +1000 Subject: [PATCH] Fix issue of games played of subsequent players not being counted --- includes/class-sp-player-list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 300e3d57..5267c64b 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -295,7 +295,6 @@ class SP_Player_List extends SP_Custom_Post { endforeach; $team_results = sp_array_value( $results, $team_id, array() ); - unset( $results[ $team_id ] ); // Loop through home team foreach ( $team_results as $result_slug => $team_result ): @@ -365,7 +364,8 @@ class SP_Player_List extends SP_Custom_Post { // Loop through away teams if ( sizeof( $results ) ): - foreach ( $results as $team_results ): + foreach ( $results as $id => $team_results ): + if ( $team_id == $id ) continue; unset( $team_results['outcome'] ); foreach ( $team_results as $result_slug => $team_result ):