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

git-svn-id: https://develop.svn.wordpress.org/trunk@22303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-10-25 20:38:55 +00:00
parent 80a1e11ab0
commit 8e674037bc
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' );
}
/**