Thumbnail creation fix from mdawaffe. fixes #3588

git-svn-id: https://develop.svn.wordpress.org/trunk@4759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-01-17 06:23:18 +00:00
parent 6e5ddf34a0
commit 7e357f96c0
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 );