diff --git a/autoload.php b/autoload.php index 5ae5ac98782..76aaf7d23ff 100644 --- a/autoload.php +++ b/autoload.php @@ -853,6 +853,7 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\Debug\\DeprecatablePropertyArray' => __DIR__ . '/includes/debug/DeprecatablePropertyArray.php', 'MediaWiki\\Export\\WikiExporterFactory' => __DIR__ . '/includes/export/WikiExporterFactory.php', 'MediaWiki\\FileBackend\\FSFile\\TempFSFileFactory' => __DIR__ . '/includes/libs/filebackend/fsfile/TempFSFileFactory.php', + 'MediaWiki\\HeaderCallback' => __DIR__ . '/includes/Request/HeaderCallback.php', 'MediaWiki\\Hook\\AbortEmailNotificationHook' => __DIR__ . '/includes/changes/Hook/AbortEmailNotificationHook.php', 'MediaWiki\\Hook\\AbortTalkPageEmailNotificationHook' => __DIR__ . '/includes/mail/Hook/AbortTalkPageEmailNotificationHook.php', 'MediaWiki\\Hook\\ActionBeforeFormDisplayHook' => __DIR__ . '/includes/actions/Hook/ActionBeforeFormDisplayHook.php', diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ba1f77133e4..7b437f8c616 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1287,7 +1287,7 @@ function wfHttpError( $code, $label, $desc ) { $wgOut->sendCacheControl(); } - MediaWiki\HeaderCallback::warnIfHeadersSent(); + \MediaWiki\Request\HeaderCallback::warnIfHeadersSent(); header( 'Content-type: text/html; charset=utf-8' ); ob_start(); print '' . diff --git a/includes/HeaderCallback.php b/includes/Request/HeaderCallback.php similarity index 97% rename from includes/HeaderCallback.php rename to includes/Request/HeaderCallback.php index 80a4945f0ae..6972cf33474 100644 --- a/includes/HeaderCallback.php +++ b/includes/Request/HeaderCallback.php @@ -1,6 +1,6 @@ execute(); - MediaWiki\HeaderCallback::warnIfHeadersSent(); + \MediaWiki\Request\HeaderCallback::warnIfHeadersSent(); // Simply serve the response from the proxied service as-is header( 'HTTP/1.1 ' . $req->getStatus() ); @@ -654,7 +654,7 @@ function wfThumbErrorText( $status, $msgText ) { function wfThumbError( $status, $msgHtml, $msgText = null, $context = [] ) { global $wgShowHostnames; - MediaWiki\HeaderCallback::warnIfHeadersSent(); + \MediaWiki\Request\HeaderCallback::warnIfHeadersSent(); if ( headers_sent() ) { LoggerFactory::getInstance( 'thumbnail' )->error(