Avoid 'headers already sent' messages for header_remove() the same way we currently do with header(). props ryan. fixes #22258.

git-svn-id: http://core.svn.wordpress.org/trunk@22303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-10-25 20:38:55 +00:00
parent f8becb79f7
commit 1773a06874
2 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,7 @@ class WP {
@header("{$name}: {$field_value}");
if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
header_remove( 'Last-Modified' );
@header_remove( 'Last-Modified' );
if ( $exit_required )
exit();

View File

@ -927,7 +927,7 @@ function nocache_headers() {
foreach( $headers as $name => $field_value )
@header("{$name}: {$field_value}");
if ( empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
header_remove( 'Last-Modified' );
@header_remove( 'Last-Modified' );
}
/**