Check for is_wp_error() return

git-svn-id: http://svn.automattic.com/wordpress/trunk@10261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-12-30 18:04:52 +00:00
parent cd6073fabb
commit 7cf82cbd00
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;