From c2f108aec487209e62bd7afde509d6fdac724cbe Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 30 Dec 2008 22:32:43 +0000 Subject: [PATCH] Don't assume page 1 when cpage is empty. Props filosofo. fixes #8630 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10277 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 4409bb080a..0244cb49c4 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;