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 '
';
foreach ( $rss->get_items( 0, $items ) as $item ) {
$link = $item->get_link();
- while ( stristr( $link, 'http' ) !== $link ) {
+ while ( ! empty( $link ) && stristr( $link, 'http' ) !== $link ) {
$link = substr( $link, 1 );
}
$link = esc_url( strip_tags( $link ) );
diff --git a/wp-includes/widgets/class-wp-widget-rss.php b/wp-includes/widgets/class-wp-widget-rss.php
index 332ba98d88..b38a8a17c3 100644
--- a/wp-includes/widgets/class-wp-widget-rss.php
+++ b/wp-includes/widgets/class-wp-widget-rss.php
@@ -50,7 +50,7 @@ class WP_Widget_RSS extends WP_Widget {
}
$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
- while ( stristr( $url, 'http' ) !== $url ) {
+ while ( ! empty( $url ) && stristr( $url, 'http' ) !== $url ) {
$url = substr( $url, 1 );
}
@@ -74,7 +74,7 @@ class WP_Widget_RSS extends WP_Widget {
$title = strip_tags( $rss->get_title() );
}
$link = strip_tags( $rss->get_permalink() );
- while ( stristr( $link, 'http' ) !== $link ) {
+ while ( ! empty( $link ) && stristr( $link, 'http' ) !== $link ) {
$link = substr( $link, 1 );
}
}