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:
parent
cd6073fabb
commit
7cf82cbd00
|
@ -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