diff --git a/src/wp-includes/class-wp.php b/src/wp-includes/class-wp.php
index 08976d6d1b..32b2f275dd 100644
a
|
b
|
class WP { |
683 | 683 | } |
684 | 684 | |
685 | 685 | // Check for paged content that exceeds the max number of pages. |
686 | | $next = '<!--nextpage-->'; |
687 | | if ( $post && ! empty( $this->query_vars['page'] ) ) { |
| 686 | $next = '<!--nextpage-->'; |
| 687 | $page_qv = is_front_page() ? 'paged' : 'page'; |
| 688 | if ( $post && ! empty( $this->query_vars[ $page_qv ] ) ) { |
688 | 689 | // Check if content is actually intended to be paged. |
689 | 690 | if ( false !== strpos( $post->post_content, $next ) ) { |
690 | | $page = trim( $this->query_vars['page'], '/' ); |
| 691 | $page = trim( $this->query_vars[ $page_qv ], '/' ); |
691 | 692 | $content_found = (int) $page <= ( substr_count( $post->post_content, $next ) + 1 ); |
692 | 693 | } else { |
693 | 694 | $content_found = false; |