Index: modules/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user.module,v retrieving revision 1.454.2.13 diff -u -r1.454.2.13 user.module --- modules/user.module 1 Jun 2005 20:16:04 -0000 1.454.2.13 +++ modules/user.module 13 Jun 2005 21:25:26 -0000 @@ -238,14 +238,15 @@ if (!$info || !$info['extension']) { form_set_error('picture', t('The uploaded file was not an image.')); } - else if (image_get_toolkit()) { - image_scale($file->filepath, $file->filepath, $maxwidth, $maxheight); - } else if (filesize($file->filepath) > (variable_get('user_picture_file_size', '30') * 1000)) { form_set_error('picture', t('The uploaded image is too large; the maximum file size is %size kB.', array('%size' => variable_get('user_picture_file_size', '30')))); } else if ($info['width'] > $maxwidth || $info['height'] > $maxheight) { - form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85')))); + if (image_get_toolkit()) { + image_scale($file->filepath, $file->filepath, $maxwidth, $maxheight); + } else { + form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85')))); + } } if (!form_get_errors()) {