diff --git a/wp-includes/post.php b/wp-includes/post.php index fccc93f544..7192f4d805 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -913,7 +913,7 @@ function &get_page(&$page, $output = OBJECT) { if ( isset($GLOBALS['page']->ID) && ($page == $GLOBALS['page']->ID) ) { $_page = & $GLOBALS['page']; wp_cache_add($_page->ID, $_page, 'pages'); - } elseif ( isset($_page) && $_page == $GLOBALS['post_cache'][$page] ) { + } elseif ( !isset($_page) && $_page == $GLOBALS['post_cache'][$page] ) { return get_post($page, $output); } elseif ( isset($_page) && $_page == wp_cache_get($page, 'pages') ) { // Got it.