[drupal-devel] [bug] Can't upload picture/avatar without PHP GD extension enabled
Project: Drupal Version: cvs Component: user.module Category: bug reports Priority: normal Assigned to: Anonymous Reported by: mathias Updated by: mathias Status: patch Attachment: http://drupal.org/files/issues/image_get_toolkit_load_gd_on_existance.patch (3.74 KB) When validating a user's picture, we currently send the file to image_scale() to automatically resize the image. This works great, but also assumes that an image toolkit is loaded to perform this action. If no toolkit is loaded, the user will always receive an error message even if the image is within specs, causing the upload to fail. This patch make image_get_toolkit() return the current toolkit only if it's enabled, that way we can use the elegant image_scale approach if a toolkit is present, or resort to the old way of checking width and height for a user's picture if need be. mathias -- View: http://drupal.org/node/17477 Edit: http://drupal.org/project/comments/add/17477
Project: Drupal Version: cvs Component: user.module Category: bug reports Priority: normal Assigned to: Anonymous Reported by: mathias Updated by: walkah Status: patch +1 on this patch. Please commit to HEAD walkah Previous comments: ------------------------------------------------------------------------ February 17, 2005 - 13:18 : mathias Attachment: http://drupal.org/files/issues/image_get_toolkit_load_gd_on_existance.patch (3.74 KB) When validating a user's picture, we currently send the file to image_scale() to automatically resize the image. This works great, but also assumes that an image toolkit is loaded to perform this action. If no toolkit is loaded, the user will always receive an error message even if the image is within specs, causing the upload to fail. This patch make image_get_toolkit() return the current toolkit only if it's enabled, that way we can use the elegant image_scale approach if a toolkit is present, or resort to the old way of checking width and height for a user's picture if need be. -- View: http://drupal.org/node/17477 Edit: http://drupal.org/project/comments/add/17477
participants (2)
-
mathias -
walkah