Make WordPress Core

Changeset 55214


Ignore:
Timestamp:
02/03/2023 03:42:11 PM (20 months ago)
Author:
audrasjb
Message:

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r54891 r55214  
    10851085 * @param object $a The first object to compare.
    10861086 * @param object $b The second object to compare.
    1087  * @return bool Whether the count value for `$a` is greater than the count value for `$b`.
     1087 * @return int The count value for `$a` minus the count value for `$b` (less than, equal to, or greater than zero).
    10881088 */
    10891089function _wp_object_count_sort_cb( $a, $b ) {
    1090     return ( $a->count > $b->count );
     1090    return ( $a->count - $b->count );
    10911091}
    10921092
Note: See TracChangeset for help on using the changeset viewer.