From d5dcf8fab78b30017feeba2287841db02f600b4a Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 8 Jun 2021 19:34:28 +0000 Subject: [PATCH] Widgets: Prevent infinite loop in PHP8+ if the URL for the widget instance is incorrectly defined This checks to make sure $link isn't empty before attempting to manipulate it. A simple test to demonstrate this can be seen at https://3v4l.org/PgSZg. Unit tests for both what already works and what is fixed by this change. Props hellofromTonya, dd32, peterwilsoncc. Fixes #53278. git-svn-id: https://develop.svn.wordpress.org/trunk@51107 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 2 +- src/wp-includes/widgets/class-wp-widget-rss.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 9aca45163d..877357606b 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -1565,7 +1565,7 @@ function wp_widget_rss_output( $rss, $args = array() ) { echo '