[wp-trac] [WordPress Trac] #61179: Deprecated messages about passing null in widgets.php

WordPress Trac noreply at wordpress.org
Tue Sep 3 18:17:17 UTC 2024


#61179: Deprecated messages about passing null in widgets.php
--------------------------------------------+------------------------------
 Reporter:  Presskopp                       |       Owner:  (none)
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  6.7
Component:  Widgets                         |     Version:  2.8
 Severity:  normal                          |  Resolution:
 Keywords:  php81 has-patch has-unit-tests  |     Focuses:  php-
                                            |  compatibility
--------------------------------------------+------------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch has-unit-tests => php81 has-patch has-unit-tests
 * focuses:   => php-compatibility
 * version:  6.6 => 2.8
 * milestone:  Awaiting Review => 6.7


Comment:

 The `$item` is an instance of `SimplePie_Item`. It's `get_description()`
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/SimplePie/Item.php#L315 method returns a `string` on success,
 otherwise, it returns `null`].

 Thus, yes, defensive logic is needed to avoid passing `null` to
 `html_entity_decode()`. Moving this ticket into 6.7.

 Which version of WordPress introduced this issue?

 `wp_widget_rss_output()` was introduced in 2.5.0. However, using SimplePie
 was introduced in 2.8.0 via [10666]. Changed the Version that introduced
 the code to 2.8.

 Also marking this ticket as `php-compatibility` focus with `php81` keyword
 to denote when the deprecation was introduced in PHP.

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


More information about the wp-trac mailing list