Ticket #5304 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Cannot upload images that are not Gif/jpeg/png

Reported by: DD32 Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: Administration Version: 2.5
Severity: normal Keywords: has-patch developer-feedback
Cc:

Description

An error is raised when uploading non gif/jpeg/png files if PHP reconises the image type.

An example of this is a BMP file.

wp_create_thumbnail Assumes that the filetype is of the given types, and fails otherwise.

I've attached a patch which aborts creating the thumbnail if its not a supported type, But a better patch would be to change the function to use the IMAGETYPE_XXX constants(Instead of 1,2,3) and to support the full range of image formats.

Attachments

5304.diff (418 bytes) - added by DD32 on 11/01/07 08:39:07.

Change History

11/01/07 08:39:07 changed by DD32

  • attachment 5304.diff added.

11/01/07 16:20:51 changed by foolswisdom

  • keywords set to has-patch developer-feedback.

11/03/07 18:33:20 changed by westi

  • status changed from new to closed.
  • resolution set to fixed.

(In [6309]) Refactor of wp-admin/includes/image.php. Fixes #5312, #4151, #4709, #5304 props DD32.