Make WordPress Core


Ignore:
Timestamp:
03/05/2015 03:56:21 AM (12 years ago)
Author:
boonebgorges
Message:

In get_next_comments_link(), ensure proper pagination when no 'cpage' query var is found.

The 'cpage' query var is only set when using comments_template() to display
comments. If displaying them in a context where 'cpage' is not yet set, the
default value should be 1, not 0.

Props MomDad, couturefreak.
Fixes #20319.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r31609 r31617  
    24672467        $page = get_query_var('cpage');
    24682468
     2469        if ( ! $page ) {
     2470                $page = 1;
     2471        }
     2472
    24692473        $nextpage = intval($page) + 1;
    24702474
Note: See TracChangeset for help on using the changeset viewer.