From 7d45163e3e01241e8276107c63cb88b803a41d3c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 21 Dec 2009 23:36:12 +0000 Subject: [PATCH] Make sure we have a SimplePie object before calling destruct. Props scribu. see #11518 git-svn-id: https://develop.svn.wordpress.org/trunk@12475 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/default-widgets.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 6dcf8225fe..e5219fecc3 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -732,7 +732,9 @@ class WP_Widget_RSS extends WP_Widget { echo $before_title . $title . $after_title; wp_widget_rss_output( $rss, $instance ); echo $after_widget; - $rss->__destruct(); + + if ( ! is_wp_error($rss) ) + $rss->__destruct(); unset($rss); }