MediaWiki master
TransformParameterError.php
Go to the documentation of this file.
1<?php
10namespace MediaWiki\Media;
11
19
25 public function __construct( $params ) {
26 parent::__construct( 'thumbnail_error',
27 max( $params['width'] ?? 0, 120 ),
28 max( $params['height'] ?? 0, 120 ),
29 wfMessage( 'thumbnail_invalid_params' )
30 );
31 }
32
34 public function getHttpStatusCode() {
35 return 400;
36 }
37}
38
40class_alias( TransformParameterError::class, 'TransformParameterError' );
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Basic media transform error class.
Shortcut class for parameter validation errors.