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
This commit is contained in:
ryan 2009-12-21 23:36:12 +00:00
parent 5f20b65114
commit 07fd78ef79
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}