Make WordPress Core

Ticket #28412: 28412.patch

File 28412.patch, 661 bytes (added by wpsmith, 12 years ago)

query.php patch

  • wp-includes/query.php

     
    37073707                        $page_for_posts = get_option('page_for_posts');
    37083708                        $this->queried_object = get_post( $page_for_posts );
    37093709                        $this->queried_object_id = (int) $this->queried_object->ID;
    3710                 } elseif ( $this->is_singular && !is_null($this->post) ) {
     3710                } elseif ( $this->is_singular && isset( $this->post ) && !is_null( $this->post ) ) {
    37113711                        $this->queried_object = $this->post;
    37123712                        $this->queried_object_id = (int) $this->post->ID;
    37133713                } elseif ( $this->is_author ) {