Fix #14503: Cast to string before setting XHR header. Close gh-1427.

This commit is contained in:
hongymagic
2013-11-11 13:28:36 +11:00
committed by Richard Gibson
parent 5f325b1bee
commit 27b22f4ef5
3 changed files with 28 additions and 7 deletions

View File

@@ -14,5 +14,10 @@ foreach( $_SERVER as $key => $value ) {
}
foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
// Only echo if key exists in the header
if ( isset( $headers[ strtoupper( $key ) ] ) ) {
echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
}
}