WordPress.org

Make WordPress Core

Ticket #17670: 17670.diff

File 17670.diff, 681 bytes (added by solarissmoke, 4 years ago)
  • wp-includes/post.php

     
    31633163                        $post_parent = $curpage->post_parent; 
    31643164                        $curpage = wp_cache_get( $post_parent, 'posts' ); 
    31653165                        if ( false === $curpage ) 
    3166                                 $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d and post_type = %s", $post_parent, $post_type ) ); 
     3166                                $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d", $post_parent ) ); 
    31673167                        $path = '/' . $curpage->post_name . $path; 
    31683168                } 
    31693169