[wp-trac] [WordPress Trac] #59052: Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/widgets.php on line 1626

WordPress Trac noreply at wordpress.org
Tue Feb 3 09:15:48 UTC 2026


#59052: Deprecated:  html_entity_decode(): Passing null to parameter #1 ($string)
of type string is deprecated in wp-includes/widgets.php on line 1626
-----------------------------------------------+---------------------------
 Reporter:  treibstoff                         |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  General                            |     Version:  6.3
 Severity:  normal                             |  Resolution:
 Keywords:  php81 has-patch reporter-feedback  |     Focuses:
-----------------------------------------------+---------------------------
Changes (by ozgursar):

 * keywords:  php81 has-patch needs-testing => php81 has-patch reporter-
     feedback


Comment:

 == Reproduction Report

 === Environment
 - WordPress: 7.0-alpha-61215-src
 - PHP: 8.2.29
 - Server: nginx/1.29.4
 - Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
 - Browser: Opera
 - OS: macOS
 - Theme: Twenty Twenty-Two 2.1
 - MU Plugins: None activated
 - Plugins:
   * Code Snippets 3.9.4
   * Test Reports 1.2.1

 === Steps taken
 1. Ensure that `WordPress Events and News` widget is active in WordPress
 dashboard
 2. Ensure that `WP_DEBUG` and `WP_DEBUG_LOG` are enabled in `wp-
 config.php`
 3. To clear the `Community events` transient add the following code to
 `functions.php` or via Code Snippets plugin.


 {{{
 add_action('admin_init', function() {
     if (isset($_GET['clear_events'])) {
         global $wpdb;
         $deleted = $wpdb->query(
             "DELETE FROM {$wpdb->options}
             WHERE option_name LIKE '%transient_community-events%'"
         );
         wp_die("Cleared {$deleted} community events transients. <a href='"
 . admin_url() . "'>Go to dashboard</a>");
     }
 });
 }}}

 4. Visit `/wp-admin/?clear_events=1` to trigger the code and remove the
 transient
 5. View WordPress Dashboard, ensure `WordPress Events and News` loads
 latest events
 6. Check `/wp-content/debug.log`
 7. Repeat the steps 4, 5, 6 a few times if necessary to check if PHP error
 occurs
 8. ❌ Bug is not occurring

 === Expected behavior
 - `PHP Deprecated` does not occur with the latest `trunk`
 (7.0-alpha-61215-src) on PHP 8.2

 Thus, removing `needs-testing` and adding `reporter-feedback`.

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


More information about the wp-trac mailing list