WordPress.org

Make WordPress Core

Changeset 16276


Ignore:
Timestamp:
11/10/2010 04:42:59 PM (11 years ago)
Author:
nacin
Message:

Ensure we have a valid post type object when checking for has_archive. props filosofo, fixes #15364.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r16267 r16276  
    13511351            if ( !empty( $qv['post_type'] ) && ! is_array( $qv['post_type'] ) ) {
    13521352                $post_type_obj = get_post_type_object( $qv['post_type'] );
    1353                 if ( $post_type_obj->has_archive )
     1353                if ( ! empty( $post_type_obj->has_archive ) )
    13541354                    $this->is_post_type_archive = true;
    13551355            }
Note: See TracChangeset for help on using the changeset viewer.