diff --git a/wp-includes/post.php b/wp-includes/post.php index 53e131469..3d3511fa4 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2056,9 +2056,12 @@ function &get_pages($args = '') { extract( $r, EXTR_SKIP ); $key = md5( serialize( $r ) ); - if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) - if ( isset( $cache[ $key ] ) ) - return apply_filters('get_pages', $cache[ $key ], $r ); + if ( $cache = wp_cache_get( 'get_pages', 'posts' ) ) { + if ( isset( $cache[ $key ] ) ) { + $pages = apply_filters('get_pages', $cache[ $key ], $r ); + return $pages; + } + } $inclusions = ''; if ( !empty($include) ) {