Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#57727 closed defect (bug) (duplicate)

uasort(): Returning bool from comparison function is deprecated

Reported by: treibstoff's profile treibstoff Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

I’m using on my archiv page:
wp_tag_cloud( ‘smallest=10&largest=18&orderby=count’ );

orderby=count produced:
Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /www/htdocs/XXXXX/wp-includes/category-template.php on line 903

Using php 8.027
WP 6.1.1

If I'm using order=RAND instead orderby=RAND it doesn't show up.

If I'm logged in my Dashboard and have the developer tools panel Query Monitor activ it doesn't show up!! If the Query Monitor is deactivated it show's up.

Is that a WordPress PHP 8 compatibility problem?
How can I avoid that???

Same Question was aked here 1 year ago:
https://wordpress.org/support/topic/wp_tag_cloud-and-php-8/

Change History (2)

#1 follow-up: @SergeyBiryukov
22 months ago

  • Component changed from General to Taxonomy
  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome back to WordPress Trac! Thanks for the report.

This is already fixed for WordPress 6.2 in [55214] / #57358.

#2 in reply to: ↑ 1 @treibstoff
22 months ago

Replying to SergeyBiryukov:

Hi there, welcome back to WordPress Trac! Thanks for the report.

This is already fixed for WordPress 6.2 in [55214] / #57358.

thanx. fixed it

Last edited 22 months ago by treibstoff (previous) (diff)
Note: See TracTickets for help on using tickets.