Skip to content

Commit

Permalink
Make sure we have a SimplePie object before calling destruct. Props s…
Browse files Browse the repository at this point in the history
…cribu. see #11518 for 2.9

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Dec 21, 2009
1 parent c69eda3 commit 269071b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wp-includes/default-widgets.php
Expand Up @@ -732,7 +732,9 @@ function widget($args, $instance) {
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);
}

Expand Down

0 comments on commit 269071b

Please sign in to comment.