Make WordPress Core

Ticket #20236: 20236.1.diff

File 20236.1.diff, 544 bytes (added by andy, 13 years ago)

fix get_all_page_ids()

  • wp-includes/post.php

     
    31243124function get_all_page_ids() {
    31253125        global $wpdb;
    31263126
    3127         if ( ! $page_ids = wp_cache_get('all_page_ids', 'posts') ) {
     3127        $page_ids = wp_cache_get('all_page_ids', 'posts');
     3128        if ( ! is_array( $page_ids ) ) {
    31283129                $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'");
    31293130                wp_cache_add('all_page_ids', $page_ids, 'posts');
    31303131        }