Fix placeholders for non-numeric values in player list

This commit is contained in:
Brian Miyaji
2017-01-13 10:17:55 +11:00
parent f1577701b2
commit 3da300f58f

View File

@@ -526,8 +526,10 @@ class SP_Player_List extends SP_Custom_Post {
endif;
endif;
if ( $placeholder !== '' ):
if ( $placeholder !== '' && is_numeric( $placeholder ) ):
$placeholders[ $player_id ][ $stat->post_name ] = sp_array_value( $placeholders[ $player_id ], $stat->post_name, 0 ) + $placeholder;
else:
$placeholders[ $player_id ][ $stat->post_name ] = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' );
endif;
endforeach;