Fix a PHP 8 deprecation warning in category-template.php uasort() helper.

Props Webrocker, jigar-bhanushali, jrf, audrasjb, costdev.
Fixes #57358.
See #56790.


git-svn-id: https://develop.svn.wordpress.org/trunk@55214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-02-03 15:42:11 +00:00
parent bd4d4af784
commit b7db42f94e

View File

@@ -1084,10 +1084,10 @@ function _wp_object_name_sort_cb( $a, $b ) {
*
* @param object $a The first object to compare.
* @param object $b The second object to compare.
* @return bool Whether the count value for `$a` is greater than the count value for `$b`.
* @return int The count value for `$a` minus the count value for `$b` (less than, equal to, or greater than zero).
*/
function _wp_object_count_sort_cb( $a, $b ) {
return ( $a->count > $b->count );
return ( $a->count - $b->count );
}
//