Add checks for WP_Error. Props filosofo. see #4809

git-svn-id: http://svn.automattic.com/wordpress/trunk@6148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-09-21 15:51:00 +00:00
parent 2794b34f4a
commit 81482db30b

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 )