| 1 | Index: wp-includes/comment-template.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/comment-template.php (revision 13695) |
|---|
| 4 | +++ wp-includes/comment-template.php (working copy) |
|---|
| 5 | @@ -1437,6 +1437,11 @@ |
|---|
| 6 | $walker = new Walker_Comment; |
|---|
| 7 | |
|---|
| 8 | $walker->paged_walk($_comments, $max_depth, $page, $per_page, $r); |
|---|
| 9 | + |
|---|
| 10 | + // Requested a non-existent page? Output the last one. |
|---|
| 11 | + if ($r['page'] > $walker->max_pages) |
|---|
| 12 | + $walker->paged_walk($_comments, $max_depth, $walker->max_pages, $per_page, $r); |
|---|
| 13 | + |
|---|
| 14 | $wp_query->max_num_comment_pages = $walker->max_pages; |
|---|
| 15 | |
|---|
| 16 | $in_comment_loop = false; |
|---|
| 17 | |
|---|