Check if placeholder is numeric

This commit is contained in:
Brian Miyaji
2017-01-31 23:16:05 +11:00
parent 99b5641d9c
commit df724b4c30

View File

@@ -560,7 +560,9 @@ class SP_Player_List extends SP_Custom_Post {
$placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' );
endif; endif;
$placeholders[ $player_id ][ $stat->post_name ] = number_format( $placeholder, $stat->precision, '.', '' ); if ( is_numeric( $placeholder ) ):
$placeholders[ $player_id ][ $stat->post_name ] = number_format( $placeholder, $stat->precision, '.', '' );
endif;
endforeach; endforeach;
endforeach; endforeach;