Make WordPress Core

Changeset 7038


Ignore:
Timestamp:
02/26/2008 10:05:05 AM (19 years ago)
Author:
ryan
Message:

Return error when requesting invalid feed format. Props pishmishy. fixes #5446

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r7001 r7038  
    902902
    903903        $hook = 'do_feed_' . $feed;
    904         do_action( $hook, $wp_query->is_comment_feed );
     904        if ( !has_action($hook) ) {
     905                $message = sprintf( __( 'ERROR: %s is not a valid feed template' ), wp_specialchars($feed));
     906                wp_die($message);
     907        }
     908
     909        do_action( $hook, $wp_query->is_comment_feed );
    905910}
    906911
Note: See TracChangeset for help on using the changeset viewer.