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

git-svn-id: https://develop.svn.wordpress.org/trunk@13813 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-03-25 17:28:16 +00:00
parent cab7d51114
commit 450110f9f2
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;
}
/**