0

Since the change to PHP 8.1 (from 8, WP 6.3 is now running, I get once a day, only while opening the dashboard this warnings (repeating twice):

"PHP Deprecated:  html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /homepages/xxx/wp-includes/widgets.php on line 1626"

Only once day I'm logged in. After reloading or new login on the same day, the warning doesn't show up. This happens on three different Installations. On one Installation I deactivated all Plugins and changed the theme to a fresh Twenty Twenty Two.

But still once a day the warning show up just after first login.

The Cron-Jobs running, are only from WP, see below.

Searched Google about this warning, I got no result about this warning in releation with "html_entity_decode()" & "wp-includes/widgets.php on line 1626"

So, I'm not sure this is a known bug in WP Core onto PHP 8.1

Any suggestion would be welcome. thanx

the Cron-Jobs running:

"wp_privacy_delete_old_export_files,wp_privacy_delete_old_export_files(),""once every hour"" "recovery_mode_clean_expired_keys,WP_Recovery_Mode->clean_expired_keys(),""once a day"" "wp_https_detection,wp_update_https_detection_errors(),""twice a day"" "wp_version_check,wp_version_check(),""twice a day"" "wp_update_plugins,wp_update_plugins(),""twice a day"" "wp_update_themes,wp_update_themes(),""twice a day"" "wp_scheduled_delete,wp_scheduled_delete(),""once a day"" "delete_expired_transients,delete_expired_transients(),""once a day"" "wp_scheduled_auto_draft_delete,wp_delete_auto_drafts(),""once a day"" "wp_update_user_counts,wp_schedule_update_user_counts(),""twice a day"" "wp_site_health_scheduled_check,WP_Site_Health->wp_cron_scheduled_check(),""once weekly"" "wp_delete_temp_updater_backups,2023-08-16 16:33:02 6 Tage, wp_delete_all_temp_backups(),""once weekly"" publish_future_post,[7],2040-09-03 03:02:56 17 Jahre, check_and_publish_future_post(),one-shot,0

2 Answers 2

1

The line in question is:

$desc = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );

Which heavily implies that a widget in your site, one that's rarely used, has a null value for its description, or doesn't bother to define one.

You will need to search for such a widget. It may be that it does not call the parent constructor in its constructor to pass it along.

0

No plugin and a fresh Twenty Twenty Two Theme is used...and still the warnings once a day.... I opened a ticket; https://core.trac.wordpress.org/ticket/59052 ...and got this answer:

"Thanks for reporting this.

In contrast to most reports of this kind (which are caused by plugins/themes doing it wrong), this does actually look like something which should be handled/fixed in WP Core in the wp_widget_rss_output() function.

It appears that the RSS feed/URL is missing the description element and the code looping through the RSS feed items doesn't take that possibility into account. By the looks of it (based on a quick glance), it also doesn't correctly handle the possibility that other expected elements could be missing.

While it is debatable whether that makes the RSS feed invalid (would need checking against the RSS specifications/RFC), I do think WP should handle this gracefully."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.