Make sure we have a SimplePie object before calling destruct. Props scribu. see #11518 for 2.9

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-21 23:37:22 +00:00
parent c69eda3791
commit 269071ba85
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);
}