This exception is very commonly logged at WMF:
2013-11-11 07:11:16 mw1157 commonswiki: [f882bb2e] /w/thumb.php?f=Wikibooks.png&w=50 Exception from line 61 of /usr/local/apache/common-local/php-1.23wmf2/includes/media/ImageHandler.php: No width specified to ImageHandler::makeParamString
#0 /usr/local/apache/common-local/php-1.23wmf2/includes/filerepo/file/File.php(808): ImageHandler->makeParamString(Array)
#1 /usr/local/apache/common-local/php-1.23wmf2/includes/filerepo/file/File.php(790): File->generateThumbName('Wikibooks-logo.png', Array)
#2 /usr/local/apache/common-local/php-1.23wmf2/thumb.php(187): File->thumbName(Array)
#3 /usr/local/apache/common-local/php-1.23wmf2/thumb.php(52): wfStreamThumb(Array)
#4 /usr/local/apache/common-local/php-1.23wmf2/thumb.php(35): wfThumbHandleRequest()
#5 /usr/local/apache/common-local/w/thumb.php(3): require('/usr/local/apache/common-local/php-1.23wmf2/thumb.php')
#6 {main}
It is apparently due to ccf89be91a4. The handling of backwards-compatible "w" parameters was moved to after the relevant thumbName() call.
This bug demonstrates a pre-existing error-handling issue. For example:
http://commons.wikimedia.org/w/thumb.php?f=Wikibooks.png
This throws an exception. It should show an error message instead. But some media types (for example, videos) allow the width to be omitted, so it's not correct to just check for a missing width parameter in thumb.php.
If the parameters are invalid, MediaHandler::normaliseParams() should return false, and indeed ImageHandler does just that:
if ( !isset( $params['width'] ) ) {
return false;
}
...
if ( !$this->normaliseParams( $image, $params ) ) {
return new TransformParameterError( $params );
}
So makeParamString() should probably fail silently, returning 0px-Wikibooks.png or some other similar garbage, so that parameter errors can be extracted from the MediaTransformOutput returned from transform().
Version: unspecified
Severity: normal