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
This commit is contained in:
nacin 2012-04-17 03:41:07 +00:00
parent dad05727fc
commit 256747055b

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;