From 450110f9f2e380c57ef3dfab4df4479b3539cb2a Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 25 Mar 2010 17:28:16 +0000 Subject: [PATCH] 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 --- wp-includes/category-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index cb746d0a7b..4a825e704f 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -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; } /**