From 1d81899a9e95d72f97ef6e0be5dbf128a18d0758 Mon Sep 17 00:00:00 2001 From: savvasha Date: Fri, 23 Oct 2020 13:30:50 +0300 Subject: [PATCH] Make sure that is a number (i.e. convert 90+2' to 90') (2) --- includes/class-sp-player.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php index bba3face..618296c8 100644 --- a/includes/class-sp-player.php +++ b/includes/class-sp-player.php @@ -456,6 +456,9 @@ class SP_Player extends SP_Custom_Post { endforeach; endif; + //Make sure that is a number (i.e. convert 90+2' to 90') + $played_minutes = (float)$played_minutes; + $totals['eventminutes'] += max( 0, $played_minutes ); if ( sp_array_value( $player_performance, 'status' ) == 'lineup' ):