Make WordPress Core

Ticket #21309: 21309.12.diff

File 21309.12.diff, 625 bytes (added by ryan, 12 years ago)

Patch the symptom

  • wp-includes/post.php

     
    34943494        $cache = array();
    34953495        $key = md5( serialize( compact(array_keys($defaults)) ) );
    34963496        if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) {
    3497                 if ( is_array($cache) && isset( $cache[ $key ] ) ) {
     3497                if ( is_array($cache) && isset( $cache[ $key ] ) && is_array( $cache[ $key ] ) ) {
    34983498                        // Convert to WP_Post instances
    34993499                        $pages = array_map( 'get_post', $cache[ $key ] );
    35003500                        $pages = apply_filters( 'get_pages', $pages, $r );