Thumbnail creation fix from mdawaffe. fixes #3588

git-svn-id: http://svn.automattic.com/wordpress/trunk@4759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-01-17 06:23:18 +00:00
parent 209e967b71
commit 0409c8671d
1 changed files with 1 additions and 1 deletions

View File

@ -2079,7 +2079,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
$max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );
if ( $max > 0 && $metadata['width'] * $metadata['height'] < $max ) {
if ( $max < 0 || $metadata['width'] * $metadata['height'] < $max ) {
$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
$thumb = wp_create_thumbnail( $file, $max_side );