From e2104af75e4e4cb8199e40678dd2d73f9747c1a4 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 8 Jun 2021 19:35:57 +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. Built from https://develop.svn.wordpress.org/trunk@51107 git-svn-id: http://core.svn.wordpress.org/trunk@50716 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 2 +- wp-includes/widgets/class-wp-widget-rss.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 304eea9638..8201ee1d71 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-51106'; +$wp_version = '5.8-alpha-51107'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 9aca45163d..877357606b 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1565,7 +1565,7 @@ function wp_widget_rss_output( $rss, $args = array() ) { echo '