From 5aecb8912f742e2192985ddd8a0f098c62d3d721 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 21 Sep 2007 15:51:00 +0000 Subject: [PATCH] Add checks for WP_Error. Props filosofo. see #4809 git-svn-id: https://develop.svn.wordpress.org/trunk@6148 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/general-template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 30a71086da..3fef92f2fe 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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 )