From ac0011a77ca1e0d84835e93332145421080ac79f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 10 Oct 2012 12:29:51 +0000 Subject: [PATCH] Make sure cache bucket is an array to avoid warning. see #21309 git-svn-id: http://core.svn.wordpress.org/trunk@22163 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 8f08b0d3d5..c1dfd168d9 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3494,7 +3494,7 @@ function get_pages($args = '') { $cache = array(); $key = md5( serialize( compact(array_keys($defaults)) ) ); if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) { - if ( is_array($cache) && isset( $cache[ $key ] ) ) { + if ( is_array($cache) && isset( $cache[ $key ] ) && is_array( $cache[ $key ] ) ) { // Convert to WP_Post instances $pages = array_map( 'get_post', $cache[ $key ] ); $pages = apply_filters( 'get_pages', $pages, $r );