Make WordPress Core


Ignore:
Timestamp:
10/10/2012 12:29:51 PM (14 years ago)
Author:
ryan
Message:

Make sure cache bucket is an array to avoid warning. see #21309

File:
1 edited

Legend:

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

    r22114 r22163  
    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 ] );
Note: See TracChangeset for help on using the changeset viewer.