From f607113b2975748696d75383ec9a272c09279d3d Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@13813 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 cb746d0a7..4a825e704 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; } /**