getRequest()->getHeader( 'Promise-Non-Write-API-Action' ) ) { header( 'Cache-Control: no-cache' ); header( 'Content-Type: text/html; charset=utf-8' ); HttpStatus::header( 400 ); $errorHtml = wfMessage( 'nonwrite-api-promise-error' ) ->useDatabase( false ) ->inContentLanguage() ->escaped(); $content = <<
$errorHtml HTML; header( 'Content-Length: ' . strlen( $content ) ); echo $content; die(); }