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:
parent
f8becb79f7
commit
1773a06874
|
@ -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();
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue