Make sure that is a number (i.e. convert 90+2' to 90') (2)

This commit is contained in:
savvasha
2020-10-23 13:30:50 +03:00
parent c17b63e628
commit 1d81899a9e

View File

@@ -456,6 +456,9 @@ class SP_Player extends SP_Custom_Post {
endforeach; endforeach;
endif; 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 ); $totals['eventminutes'] += max( 0, $played_minutes );
if ( sp_array_value( $player_performance, 'status' ) == 'lineup' ): if ( sp_array_value( $player_performance, 'status' ) == 'lineup' ):