From 7ab6035d59e88836dd780acd1acffd9d23f1a8bc Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 25 Feb 2010 21:16:07 +0000 Subject: [PATCH] Return a 404 error if the request feed type doesn't exist not a 500. Fixes #12341 props aaroncampbell. git-svn-id: http://svn.automattic.com/wordpress/trunk@13408 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index fa75e7946..ee1c297dd 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1706,7 +1706,7 @@ function do_feed() { $hook = 'do_feed_' . $feed; if ( !has_action($hook) ) { $message = sprintf( __( 'ERROR: %s is not a valid feed template.' ), esc_html($feed)); - wp_die($message); + wp_die( $message, '', array( 'response' => 404 ) ); } do_action( $hook, $wp_query->is_comment_feed );