diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index 383acb379e..4c0af12d53 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -77,6 +77,9 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_ else $file = $pagenow; //$_SERVER['PHP_SELF']; + if ( $page > count($pages) ) // if the requested page doesn't exist + $page = count($pages); // give them the highest numbered page that DOES exist + $content = $pages[$page-1]; $content = explode('', $content, 2); if ( (preg_match('//', $post->post_content) && ((!$multipage) || ($page==1))) )