From 3da300f58fe48688301ec72cc682fb033a8aa6fc Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 13 Jan 2017 10:17:55 +1100 Subject: [PATCH] Fix placeholders for non-numeric values in player list --- 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 2d3a7074..0cad9bd5 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -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;