X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebResponse.php;h=0208a72ab962717091f1870193fbe9f7fa1c1248;hb=19e9e672f31c792622fc8c27ad511f27263979a8;hp=f5fb47fc5bbca1bcd34fb7866a61c8ae1a2976bc;hpb=fa7d345ba7aa4343ac3415c0d7f86861deef1c75;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 {