No need for by-reference when calculating the queried object in PHP5. props SergeyBiryukov, duck_, fixes #20039.

git-svn-id: https://develop.svn.wordpress.org/trunk@20491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-04-17 03:41:07 +00:00
parent 8481a619b6
commit 6588a3fa0c

View File

@@ -1624,7 +1624,7 @@ class WP_Query {
}
if ( '' != $qv['pagename'] ) {
$this->queried_object =& get_page_by_path($qv['pagename']);
$this->queried_object = get_page_by_path($qv['pagename']);
if ( !empty($this->queried_object) )
$this->queried_object_id = (int) $this->queried_object->ID;
else
@@ -2977,7 +2977,7 @@ class WP_Query {
$this->queried_object = get_post_type_object( $this->get('post_type') );
} elseif ( $this->is_posts_page ) {
$page_for_posts = get_option('page_for_posts');
$this->queried_object = & get_page( $page_for_posts );
$this->queried_object = get_page( $page_for_posts );
$this->queried_object_id = (int) $this->queried_object->ID;
} elseif ( $this->is_singular && !is_null($this->post) ) {
$this->queried_object = $this->post;