From 801ccfd7a4fa1f8d7db43c67ee80c155e36f967c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 19 Jan 2017 16:31:36 +1100 Subject: [PATCH] Fix player list sorting error with non-numeric values --- includes/class-sp-player-list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 487b3c0e..4ad0c12b 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -719,7 +719,7 @@ class SP_Player_List extends SP_Custom_Post { else: // Compare performance values - $output = sp_array_value( $a, $priority['key'], 0 ) - sp_array_value( $b, $priority['key'], 0 ); + $output = floatval( sp_array_value( $a, $priority['key'], 0 ) ) - floatval( sp_array_value( $b, $priority['key'], 0 ) ); endif;