From 6588a3fa0cc956d18482ad07602deb6ba52af290 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 17 Apr 2012 03:41:07 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 303a395275..11849503ce 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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;