Skip to content

Commit

Permalink
Merge pull request #3091 from 10up/burhan/fix-3075
Browse files Browse the repository at this point in the history
Fix: Deprecated Warning for uasort()
  • Loading branch information
felipeelia authored Nov 1, 2022
2 parents 526bd01 + 88e3afd commit 0cd96c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/classes/Feature/Facets/Types/Taxonomy/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,14 @@ protected function order_by_selected( $terms, $selected_terms, $order = false, $
uasort(
$ordered_terms,
function( $a, $b ) {
return $a->count > $b->count;
return $a->count <=> $b->count;
}
);
} else {
uasort(
$ordered_terms,
function( $a, $b ) {
return $a->count < $b->count;
return $b->count <=> $a->count;
}
);
}
Expand Down

0 comments on commit 0cd96c5

Please sign in to comment.