From 795ae271fe76d00a86f02f5ebeb6042a9d6701a7 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 22 Oct 2018 16:34:56 +1100 Subject: [PATCH] Fix calculated totals resetting to zero --- includes/class-sp-event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index 21cbde04..ebc3f1a0 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -188,7 +188,7 @@ class SP_Event extends SP_Custom_Post{ if ( ! is_array( $players ) ) continue; foreach ( $players as $player => $player_performance ): - if ( ! is_array( $player_performance ) ) continue; + if ( ! is_array( $player_performance ) || ! $player ) continue; // Prepare existing values for equation calculation $vars = $player_performance;