Make WordPress Core


Ignore:
Timestamp:
08/20/2012 04:38:43 PM (12 years ago)
Author:
nacin
Message:

Always return a variable reference from get_pages(). props wonderboymusic, foxinni. fixes #20756.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r21302 r21550  
    33913391    global $wpdb;
    33923392
     3393    $pages = false;
     3394
    33933395    $defaults = array(
    33943396        'child_of' => 0, 'sort_order' => 'ASC',
     
    34093411    $hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
    34103412    if ( !in_array( $post_type, $hierarchical_post_types ) )
    3411         return false;
     3413        return $pages;
    34123414
    34133415    // Make sure we have a valid post status
     
    34153417        $post_status = explode( ',', $post_status );
    34163418    if ( array_diff( $post_status, get_post_stati() ) )
    3417         return false;
     3419        return $pages;
    34183420
    34193421    $cache = array();
Note: See TracChangeset for help on using the changeset viewer.