mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
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:
parent
80a1e11ab0
commit
8e674037bc
@ -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…
x
Reference in New Issue
Block a user