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
This commit is contained in:
westi 2009-02-28 09:30:46 +00:00
parent 0a90b7aaf9
commit 51dc94d250
1 changed files with 6 additions and 1 deletions

View File

@ -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));
}