Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
BadRequestError
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 report
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * @license GPL-2.0-or-later
4 * @file
5 */
6
7namespace MediaWiki\Exception;
8
9/**
10 * An error page that emits an HTTP 400 Bad Request status code.
11 *
12 * @newable
13 * @stable to extend
14 * @since 1.28
15 * @ingroup Exception
16 */
17class BadRequestError extends ErrorPageError {
18
19    /**
20     * @stable to override
21     * @inheritDoc
22     */
23    public function report( $action = self::SEND_OUTPUT ) {
24        global $wgOut;
25        $wgOut->setStatusCode( 400 );
26        parent::report( $action );
27    }
28}
29
30/** @deprecated class alias since 1.44 */
31class_alias( BadRequestError::class, 'BadRequestError' );