Skip to content

Commit f880327

Browse files
committed
fixing failing testcase by using page id from query vars
1 parent d66cdb2 commit f880327

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wp-includes/class-wp-query.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,7 @@ public function parse_query( $query = '' ) {
11051105

11061106
if ( $query_vars['page_id'] ) {
11071107
if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == $query_vars['page_id'] ) {
1108-
if ( $qv['page_id'] ) {
1109-
if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == $qv['page_id'] ) {
1110-
$posts_page = get_post( $this->queried_object_id );
1108+
$posts_page = get_post( $query_vars['page_id'] );
11111109
if ( ! $posts_page || 'publish' !== $posts_page->post_status ) {
11121110
$this->set_404();
11131111
return;

0 commit comments

Comments
 (0)