[wp-trac] [WordPress Trac] #57727: uasort(): Returning bool from comparison function is deprecated

WordPress Trac noreply at wordpress.org
Wed Feb 15 19:25:13 UTC 2023


#57727: uasort(): Returning bool from comparison function is deprecated
--------------------------+------------------------
 Reporter:  treibstoff    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => duplicate
 * component:  General => Taxonomy
 * milestone:  Awaiting Review =>


Old description:

> 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/]

New description:

 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/]

--

Comment:

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

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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57727#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list