From fd75c66fb180708bce130696a4ba23285c5fd381 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Tue, 31 Jan 2017 23:30:34 +1100 Subject: [PATCH] Move placeholders array assignment outside of conditional --- includes/class-sp-player-list.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index e3b9966f..c6ba4cda 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -560,9 +560,11 @@ class SP_Player_List extends SP_Custom_Post { $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); endif; - if ( is_numeric( $placeholder ) ): - $placeholders[ $player_id ][ $stat->post_name ] = number_format( $placeholder, $stat->precision, '.', '' ); + if ( is_numeric( $placeholder ) && $stat->precision ): + $placeholder = number_format( $placeholder, $stat->precision, '.', '' ); endif; + + $placeholders[ $player_id ][ $stat->post_name ] = $placeholder; endforeach; endforeach;