Add checks for WP_Error. Props filosofo. see #4809

git-svn-id: https://develop.svn.wordpress.org/trunk@6148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-09-21 15:51:00 +00:00
parent a83ced4491
commit 5aecb8912f
1 changed files with 2 additions and 0 deletions

View File

@ -291,6 +291,8 @@ function single_tag_title($prefix = '', $display = true ) {
if ( !empty($tag_id) ) {
$my_tag = &get_term($tag_id, 'post_tag', OBJECT, 'display');
if ( is_wp_error( $my_tag ) )
return false;
$my_tag_name = apply_filters('single_tag_title', $my_tag->name);
if ( !empty($my_tag_name) ) {
if ( $display )