X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebResponse.php;h=0208a72ab962717091f1870193fbe9f7fa1c1248;hb=80847dcb32f4f6ecf198d3ff4c8bc71333832c75;hp=f5fb47fc5bbca1bcd34fb7866a61c8ae1a2976bc;hpb=c78d1c842f7d4306cc20ffe4123e50fcf341fe76;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebResponse.php b/includes/WebResponse.php index f5fb47fc5b..0208a72ab9 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -39,9 +39,7 @@ 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() ); - } + \MediaWiki\HeaderCallback::warnIfHeadersSent(); if ( $http_response_code ) { header( $string, $replace, $http_response_code ); } else {