Ticket #11694: 11694.diff
File 11694.diff, 803 bytes (added by , 15 years ago) |
---|
-
wp-includes/classes.php
484 484 $wp_query->set_404(); 485 485 status_header( 404 ); 486 486 nocache_headers(); 487 } elseif ( is_singular() && get_query_var('page') > 1 ) { 488 $pages = substr_count( $wp_query->posts[0]->post_content, '<!--nextpage-->' ) + 1; 489 if ( get_query_var('page') > $pages ) { 490 $wp_query->set_404(); 491 status_header( 404 ); 492 nocache_headers(); 493 // Disable Canonical redirects, as it'll guess the permalink for 404's. 494 remove_action('template_redirect', 'redirect_canonical'); 495 } else { 496 status_header( 200 ); 497 } 487 498 } elseif ( !is_404() ) { 488 499 status_header( 200 ); 489 500 }