X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;ds=sidebyside;f=includes%2FWebResponse.php;h=0208a72ab962717091f1870193fbe9f7fa1c1248;hb=fd1e608caee198956d2d4cbdf9cb96870973a776;hp=f5fb47fc5bbca1bcd34fb7866a61c8ae1a2976bc;hpb=5570861cb6814b02762ed4a2a701159714e846fa;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 {