From 256747055b75a53deaab3daf7850f55f24bc83aa Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@20491 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 303a39527..11849503c 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;