96 public static function header( $code ) {
97 static $version =
null;
98 $message = self::getMessage( $code );
99 if ( $message ===
null ) {
100 trigger_error(
"Unknown HTTP status code $code", E_USER_WARNING );
104 \MediaWiki\Request\HeaderCallback::warnIfHeadersSent();
105 if ( $version ===
null ) {
106 $version = isset( $_SERVER[
'SERVER_PROTOCOL'] ) &&
107 $_SERVER[
'SERVER_PROTOCOL'] ===
'HTTP/1.0' ?
112 header(
"HTTP/$version $code $message" );