dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c1833a
)
Log a warning when headers were already sent and we can't
author
Chad Horohoe
<chadh@wikimedia.org>
Wed, 8 Feb 2017 21:29:31 +0000
(13:29 -0800)
committer
Chad Horohoe
<chadh@wikimedia.org>
Wed, 8 Feb 2017 21:38:58 +0000
(13:38 -0800)
Change-Id: Id01f4712e3dd297594e9ed2389ad411be5f553e7
includes/WebResponse.php
patch
|
blob
|
history
diff --git
a/includes/WebResponse.php
b/includes/WebResponse.php
index
339b2e3
..
f5fb47f
100644
(file)
--- a/
includes/WebResponse.php
+++ b/
includes/WebResponse.php
@@
-39,6
+39,9
@@
class WebResponse {
* @param null|int $http_response_code Forces the HTTP response code to the specified value.
*/
public function header( $string, $replace = true, $http_response_code = null ) {
+ if ( headers_sent() ) {
+ MWDebug::warning( 'Headers already sent, should send headers earlier than ' . wfGetCaller() );
+ }
if ( $http_response_code ) {
header( $string, $replace, $http_response_code );
} else {