diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index ce88c102cf..11a0b9e6f8 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -747,14 +747,15 @@ class WP { $content_found = true; if ( is_singular() ) { - $post = isset( $wp_query->post ) ? $wp_query->post : null; - $next = ''; + $post = isset( $wp_query->post ) ? $wp_query->post : null; + $next = ''; + $page_qv = is_front_page() ? 'paged' : 'page'; // Check for paged content that exceeds the max number of pages. - if ( $post && ! empty( $this->query_vars['page'] ) ) { + if ( $post && ! empty( $this->query_vars[ $page_qv ] ) ) { // Check if content is actually intended to be paged. if ( str_contains( $post->post_content, $next ) ) { - $page = trim( $this->query_vars['page'], '/' ); + $page = trim( $this->query_vars[ $page_qv ], '/' ); $content_found = (int) $page <= ( substr_count( $post->post_content, $next ) + 1 ); } else { $content_found = false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 039f6d30bb..e88031962f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59090'; +$wp_version = '6.7-alpha-59091'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.