From 51dc94d2506815dce35879ee762c2116be49f5fc Mon Sep 17 00:00:00 2001 From: westi Date: Sat, 28 Feb 2009 09:30:46 +0000 Subject: [PATCH] Make the exit call explicit so that it works. Fixes #9248. git-svn-id: http://svn.automattic.com/wordpress/trunk@10672 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 9b5efd7af4..f01e46b0b7 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -304,6 +304,8 @@ class WP { function send_headers() { $headers = array('X-Pingback' => get_bloginfo('pingback_url')); $status = null; + $exit_required = false; + if ( is_user_logged_in() ) $headers = array_merge($headers, wp_get_nocache_headers()); if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) { @@ -349,7 +351,7 @@ class WP { (($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) : (($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) { $status = 304; - add_action('send_headers', 'exit', 1); + $exit_required = true; } } @@ -360,6 +362,9 @@ class WP { foreach( (array) $headers as $name => $field_value ) @header("{$name}: {$field_value}"); + if ($exit_required) + exit(); + do_action_ref_array('send_headers', array(&$this)); }