Move placeholders array assignment outside of conditional

This commit is contained in:
Brian Miyaji
2017-01-31 23:30:34 +11:00
parent df724b4c30
commit fd75c66fb1

View File

@@ -560,9 +560,11 @@ 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;
if ( is_numeric( $placeholder ) ): if ( is_numeric( $placeholder ) && $stat->precision ):
$placeholders[ $player_id ][ $stat->post_name ] = number_format( $placeholder, $stat->precision, '.', '' ); $placeholder = number_format( $placeholder, $stat->precision, '.', '' );
endif; endif;
$placeholders[ $player_id ][ $stat->post_name ] = $placeholder;
endforeach; endforeach;
endforeach; endforeach;