Skip to content

Commit

Permalink
Fix #12641: HTTP_ACCEPT is not a constant
Browse files Browse the repository at this point in the history
Commit f081ed1 accidentally referenced
$_SERVER[HTTP_ACCEPT] where HTTP_ACCEPT is not a valid constant. It
should be $_SERVER['HTTP_ACCEPT'] instead (ie. the array key is a
string).
  • Loading branch information
davidhicks committed Jan 7, 2011
1 parent 644a199 commit 8d464c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/http_api.php
Expand Up @@ -123,7 +123,7 @@ function http_content_headers() {
// Only use the application/xhtml+xml MIME type if the browser
// has indicated support for this type. Internet Explorer
// prior to version 9 only supports the text/html MIME type.
if ( stristr( $_SERVER[HTTP_ACCEPT], 'application/xhtml+xml' ) ) {
if ( stristr( $_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml' ) ) {
header( 'Content-Type: application/xhtml+xml; charset=UTF-8' );
} else {
header( 'Content-Type: text/html; charset=UTF-8' );
Expand Down

0 comments on commit 8d464c0

Please sign in to comment.