From df724b4c304a6d2331f84c8b8c302154812c1175 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Tue, 31 Jan 2017 23:16:05 +1100 Subject: [PATCH] Check if placeholder is numeric --- includes/class-sp-player-list.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 181363b0..e3b9966f 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -560,7 +560,9 @@ class SP_Player_List extends SP_Custom_Post { $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); 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;