mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Ensure we have a valid post type object when checking for has_archive. props filosofo, fixes #15364.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d26a1aa4ef
commit
8b6cb32160
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user