dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
fab9b89
)
Merge "Protect against non-arrays when fetching headers"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Tue, 17 Sep 2013 17:48:06 +0000
(17:48 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Tue, 17 Sep 2013 17:48:06 +0000
(17:48 +0000)
includes/WebRequest.php
patch
|
blob
|
history
diff --git
a/includes/WebRequest.php
b/includes/WebRequest.php
index
55bddfc
..
23eee04
100644
(file)
--- a/
includes/WebRequest.php
+++ b/
includes/WebRequest.php
@@
-881,8
+881,9
@@
class WebRequest {
return;
}
- if ( function_exists( 'apache_request_headers' ) ) {
- foreach ( apache_request_headers() as $tempName => $tempValue ) {
+ $apacheHeaders = function_exists( 'apache_request_headers' ) ? apache_request_headers() : false;
+ if ( $apacheHeaders ) {
+ foreach ( $apacheHeaders as $tempName => $tempValue ) {
$this->headers[strtoupper( $tempName )] = $tempValue;
}
} else {