get_queried_object should not return an array of terms, and wp_title should check is_tax. Hat tip: andy

git-svn-id: https://develop.svn.wordpress.org/trunk@7941 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2008-05-16 03:57:09 +00:00
parent fc437f1276
commit ea8035697d
2 changed files with 15 additions and 1 deletions

View File

@@ -1610,8 +1610,9 @@ class WP_Query {
$tax = $this->get('taxonomy');
$slug = $this->get('term');
$term = &get_terms($tax, array('slug'=>$slug));
if ( is_wp_error($term) )
if ( is_wp_error($term) || empty($term) )
return $term;
$term = $term[0];
$this->queried_object = $term;
$this->queried_object_id = $term->term_id;
} else if ($this->is_posts_page) {