[wp-trac] [WordPress Trac] #23032: Call get_page_hierarchy without passing by reference in wp-includes/rewrite.php page_uri_index

WordPress Trac noreply at wordpress.org
Fri Dec 21 01:06:14 UTC 2012


#23032: Call get_page_hierarchy without passing by reference in wp-
includes/rewrite.php page_uri_index
-----------------------------+--------------------------
 Reporter:  Askapache        |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  trunk            |   Severity:  minor
 Keywords:  has-patch        |
-----------------------------+--------------------------
 PHP Strict Standards:  Only variables should be passed by reference in wp-
 includes/rewrite.php on line 825

 Due to &$pages in the function declaration.
 {{{
 function get_page_hierarchy( &$pages, $page_id = 0 )
 }}}

 Instead of calling get_page_hierarchy with the full $wpdb->get_results as
 the arg, save the get_results to a variable and pass that to
 get_page_hierarchy.


 {{{
 $pages = $wpdb->get_results(...)
 $posts = get_page_hierarchy( $pages );
 }}}

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


More information about the wp-trac mailing list