[wp-trac] [WordPress Trac] #20039: parse_query attempts to assign a non-variable by reference

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 14 08:38:23 UTC 2012


#20039: parse_query attempts to assign a non-variable by reference
--------------------------+-----------------------------
 Reporter:  lgladdy       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Line 1628 of query.php is currently:
 {{{
 $this->queried_object =& get_page_by_path($qv['pagename']);
 }}}
 This results in a PHP error of "Only variables should be assigned by
 reference", pulling the result of the get_page_by_path into a variable and
 referencing that works okay, but i'm not confident enough in that not
 breaking other things to submit it as a patch!
 {{{
 $path = get_page_by_path($qv['pagename']);
 $this->queried_object =& $path;
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20039>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list