return $this->getMediaTransformError( $params, $errMsg );
}
+ if ( filesize( $params['srcPath'] ) === 0 ) {
+ $err = "Image file size seems to be zero.";
+ wfDebug( "$err\n" );
+ $errMsg = wfMessage( 'thumbnail_image-size-zero', $params['srcPath'] )->text();
+
+ return $this->getMediaTransformError( $params, $errMsg );
+ }
+
$src_image = call_user_func( $loader, $params['srcPath'] );
$rotation = function_exists( 'imagerotate' ) && !isset( $params['disableRotation'] ) ?
"thumbnail_dest_directory": "Unable to create destination directory",
"thumbnail_image-type": "Image type not supported",
"thumbnail_gd-library": "Incomplete GD library configuration: Missing function $1",
+ "thumbnail_image-size-zero": "Image file size seems to be zero.",
"thumbnail_image-missing": "File seems to be missing: $1",
"thumbnail_image-failure-limit": "There have been too many recent failed attempts ($1 or more) to render this thumbnail. Please try again later.",
"import": "Import pages",
"thumbnail_image-type": "This is the parameter 1 of the message {{msg-mw|thumbnail error}}",
"thumbnail_gd-library": "This is the parameter 1 of the message {{msg-mw|thumbnail error}}.\n*$1 is a function name of the GD library",
"thumbnail_image-missing": "This is the parameter 1 of the message {{msg-mw|thumbnail error}}.\n*$1 is the path incl. filename of the missing image",
+ "thumbnail_image-size-zero": "This is the parameter 1 of the message {{msg-mw|thumbnail error}}.\n*$1 is the path incl. filename of the image with zero size",
"thumbnail_image-failure-limit": "Used as <code>$1</code> in {{msg-mw|Thumbnail error}}.\n\nParameters:\n* $1 - the maximum allowed number of failed attempts",
"import": "The title of the special page [[Special:Import]];",
"import-summary": "{{doc-specialpagesummary|import}}",