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:
parent
aaad7cb804
commit
a241246c35
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user