Make WordPress Core

Ticket #30210: 30210.2.patch

File 30210.2.patch, 526 bytes (added by stevenkword, 8 years ago)
  • src/wp-includes/functions.php

     
    12041204function do_feed() {
    12051205        global $wp_query;
    12061206
     1207        if ( ! $wp_query->have_posts() && ! ( $wp_query->tax_query instanceof WP_Tax_Query ) ) {
     1208                wp_die( __( 'ERROR: This is not a valid feed.' ), '', array( 'response' => 404 ) );
     1209        }
     1210
    12071211        $feed = get_query_var( 'feed' );
    12081212
    12091213        // Remove the pad, if present.