WordPress.org

Make WordPress Core

Ticket #23032: rewrite.php.patch

File rewrite.php.patch, 673 bytes (added by Askapache, 5 years ago)

Patch to call function with variable instead of referenced

  • rewrite.php

     
    822822                global $wpdb;
    823823
    824824                //get pages in order of hierarchy, i.e. children after parents
    825                 $posts = get_page_hierarchy( $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'") );
     825                $pages = $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'");
     826                $posts = get_page_hierarchy( $pages );
    826827
    827828                // If we have no pages get out quick
    828829                if ( !$posts )