From 07fd78ef799ba4471bd7a14dd7f460e82727189f Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@12475 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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); }