Make sure cache bucket is an array to avoid warning. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@22163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
063c4c5ae2
commit
594ef24dca
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue