Don't return WP_Error from term_description(). Props filosofo. fixes #12707

git-svn-id: http://svn.automattic.com/wordpress/trunk@13813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-03-25 17:28:16 +00:00
parent e1ecbc841a
commit f607113b29
1 changed files with 2 additions and 1 deletions

View File

@ -868,7 +868,8 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) {
$taxonomy = $term->taxonomy;
$term = $term->term_id;
}
return get_term_field( 'description', $term, $taxonomy );
$description = get_term_field( 'description', $term, $taxonomy );
return is_wp_error( $description ) ? '' : $description;
}
/**