Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#5304 closed defect (bug) (fixed)

Cannot upload images that are not Gif/jpeg/png

Reported by: dd32's profile DD32 Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: Administration Keywords: has-patch developer-feedback
Focuses: Cc:


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 (1)

5304.diff (418 bytes) - added by DD32 16 years ago.

Download all attachments as: .zip

Change History (3)

16 years ago

#1 @foolswisdom
16 years ago

  • Keywords has-patch developer-feedback added

#2 @westi
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.