diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index ac5abf06b9..fba00f2a33 100644
--- a/wp-includes/widgets.php
+++ b/wp-includes/widgets.php
@@ -966,10 +966,10 @@ function wp_widget_rss($args, $number = 1) {
?>
-
items ) ) {
+ if ( is_array( $rss->items ) && !empty( $rss->items ) ) {
$rss->items = array_slice($rss->items, 0, $num_items);
+ echo '';
foreach ($rss->items as $item ) {
while ( strstr($item['link'], 'http') != $item['link'] )
$item['link'] = substr($item['link'], 1);
@@ -987,13 +987,12 @@ function wp_widget_rss($args, $number = 1) {
}
echo "- $summary
";
}
+ echo '
';
} else {
- echo '- ' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '
';
+ echo '- ' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '
';
}
-?>
-
-
-