From fcd36216e0726d081128fc6f5523966d3a50ecb2 Mon Sep 17 00:00:00 2001 From: Peter Westwood 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: https://develop.svn.wordpress.org/trunk@13408 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 fa75e7946f..ee1c297dd9 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 );