From d50013b9579d40212c0b91792197c1be29c674f2 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 10 Nov 2010 16:42:59 +0000 Subject: [PATCH] Ensure we have a valid post type object when checking for has_archive. props filosofo, fixes #15364. git-svn-id: https://develop.svn.wordpress.org/trunk@16276 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index c90c3ec0d7..309697b15b 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1350,7 +1350,7 @@ class WP_Query extends WP_Object_Query { if ( !empty( $qv['post_type'] ) && ! is_array( $qv['post_type'] ) ) { $post_type_obj = get_post_type_object( $qv['post_type'] ); - if ( $post_type_obj->has_archive ) + if ( ! empty( $post_type_obj->has_archive ) ) $this->is_post_type_archive = true; }