Minor tweaks for E_STRICT error_reporting mode warnings:
Undefined index: width in includes/media/Generic.php on line 185 Undefined index: width in includes/MediaTransformOutput.php on line 161 Undefined index: height in includes/MediaTransformOutput.php on line 161 on this test: curl --silent --include --globoff -F 'f'='small-email.png' -F 'r'='0' 'http://localhost/wiki/thumb.php' (Using 180 as the fallback width in Generic.php, but if that's not a reasonable default please change).
This commit is contained in:
parent
ce61cfc101
commit
84c10464d1
2 changed files with 5 additions and 2 deletions
|
|
@ -158,7 +158,8 @@ class MediaTransformError extends MediaTransformOutput {
|
|||
class TransformParameterError extends MediaTransformError {
|
||||
function __construct( $params ) {
|
||||
parent::__construct( 'thumbnail_error',
|
||||
max( @$params['width'], 180 ), max( @$params['height'], 180 ),
|
||||
max( isset( $params['width'] ) ? $params['width'] : 0, 180 ),
|
||||
max( isset( $params['height'] ) ? $params['height'] : 0, 180 ),
|
||||
wfMsg( 'thumbnail_invalid_params' ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,8 +181,10 @@ abstract class ImageHandler extends MediaHandler {
|
|||
function makeParamString( $params ) {
|
||||
if ( isset( $params['physicalWidth'] ) ) {
|
||||
$width = $params['physicalWidth'];
|
||||
} else {
|
||||
} else if ( isset( $params['width'] ) ) {
|
||||
$width = $params['width'];
|
||||
} else {
|
||||
$width = 180;
|
||||
}
|
||||
# Removed for ProofreadPage
|
||||
#$width = intval( $width );
|
||||
|
|
|
|||
Loading…
Reference in a new issue