Make WordPress Core

Ticket #15963: 15963.3.diff

File 15963.3.diff, 438 bytes (added by SergeyBiryukov, 12 years ago)

Original patch, refreshed

  • wp-includes/post.php

     
    34423442        $uri = $page->post_name;
    34433443
    34443444        foreach ( $page->ancestors as $parent ) {
    3445                 $uri = get_post( $parent )->post_name . "/" . $uri;
     3445                if ( $parent = get_post( $parent ) )
     3446                        $uri = $parent->post_name . '/' . $uri;
    34463447        }
    34473448
    34483449        return $uri;