From 3bd0e07d3007ec924680cac79febc76c4b85324b Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Dec 2008 22:32:58 +0000 Subject: [PATCH] Don't assume page 1 when cpage is empty. Props filosofo. fixes #8630 for 2.7 git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10278 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index d11327f2aa..e742072115 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1261,9 +1261,6 @@ function get_next_comments_link( $label = '', $max_page = 0 ) { $page = get_query_var('cpage'); - if ( !$page ) - $page = 1; - $nextpage = intval($page) + 1; if ( empty($max_page) ) @@ -1307,10 +1304,7 @@ function get_previous_comments_link( $label = '' ) { $page = get_query_var('cpage'); - if ( !$page ) - $page = 1; - - if ( $page <= 1 ) + if ( intval($page) <= 1 ) return; $prevpage = intval($page) - 1;