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
This commit is contained in:
parent
e7a5bb8295
commit
c2f108aec4
@ -1261,9 +1261,6 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
|
|||||||
|
|
||||||
$page = get_query_var('cpage');
|
$page = get_query_var('cpage');
|
||||||
|
|
||||||
if ( !$page )
|
|
||||||
$page = 1;
|
|
||||||
|
|
||||||
$nextpage = intval($page) + 1;
|
$nextpage = intval($page) + 1;
|
||||||
|
|
||||||
if ( empty($max_page) )
|
if ( empty($max_page) )
|
||||||
@ -1307,10 +1304,7 @@ function get_previous_comments_link( $label = '' ) {
|
|||||||
|
|
||||||
$page = get_query_var('cpage');
|
$page = get_query_var('cpage');
|
||||||
|
|
||||||
if ( !$page )
|
if ( intval($page) <= 1 )
|
||||||
$page = 1;
|
|
||||||
|
|
||||||
if ( $page <= 1 )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$prevpage = intval($page) - 1;
|
$prevpage = intval($page) - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user