mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user