Fix player list sorting error with non-numeric values

This commit is contained in:
Brian Miyaji
2017-01-19 16:31:36 +11:00
parent c319bf8c8f
commit 801ccfd7a4

View File

@@ -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;