From 064a9332dffd2a6b38b6058b98acfe36b11ab367 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 17 Oct 2008 22:55:30 +0000 Subject: [PATCH] Must pass var by ref. Props x11tech. fixes #7781 git-svn-id: http://svn.automattic.com/wordpress/trunk@9239 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 53e131469d..3d3511fa4c 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) ) {