Check for is_wp_error() return

git-svn-id: https://develop.svn.wordpress.org/trunk@10261 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-30 18:04:52 +00:00
parent aaad7cb804
commit a241246c35
1 changed files with 3 additions and 0 deletions

View File

@ -507,6 +507,9 @@ case 'get-tagcloud' :
if ( empty( $tags ) )
die( __('No tags found!') );
if ( is_wp_error($tags) )
die($tags->get_error_message());
foreach ( $tags as $key => $tag ) {
$tags[ $key ]->link = '#';
$tags[ $key ]->id = $tag->term_id;