Make WordPress Core

Opened 16 years ago

Closed 13 years ago

Last modified 13 years ago

#16106 closed defect (bug) (duplicate)

Error reading EXIF data from uploaded image

Reported by: 4D4M Owned by:
Priority: normal Milestone:
Component: Media Version: 2.5
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

When the user uploads an image file with EXIF data, that data is saved to the database. exif_read_data() reads the EXIF headers from a JPEG or TIFF image file. This way you can read meta data generated by digital cameras.

In this case the EXIF 'ISOSpeedRatings' key had an array for a value, but a string was expected. So the subsequent trim() call failed.

Patch attached.

Attachments (2)

image.diff​ (1.0 KB ) - added by 4D4M 16 years ago.
Patch for Ticket #16106 - image.diff
16106.diff​ (856 bytes ) - added by solarissmoke 16 years ago.
Accept EXIF isoSpeedRatings as either array or string

Download all attachments as: .zip

Change History (11)

@4D4M
16 years ago

Patch for Ticket #16106 - image.diff

#1 @4D4M
16 years ago

  • Cc wordpress@… added

#2 @hakre
16 years ago

Thanks for reporting the issue and providing a patch.

Last edited 16 years ago by hakre (previous) (diff)

#3 @Otto42
16 years ago

Can we get an example image file that causes the problem?

#4 @solarissmoke
16 years ago

  • Keywords needs-patch added

Apparently some cameras do provide more than one ISO value (HI and LO). In any case I checked the ISO specification (​http://www.exif.org/specifications.html) and multiple values are permitted for isoSpeedRatings:

ISOSpeedRatings
Indicates the ISO Speed and ISO Latitude of the camera or input device as specified in ISO 12232. 
Tag  =      34855 (8827.H) 
Type  =      SHORT 
Count  =      Any **This means multiple values acceptable**
Default  =      none 

Think this could be done without defining a new function however.

@solarissmoke
16 years ago

Accept EXIF isoSpeedRatings as either array or string

#5 @solarissmoke
16 years ago

  • Keywords has-patch added; needs-patch removed

#6 @c3mdigital
13 years ago

  • Keywords close added; has-patch removed
  • Resolution → duplicate
  • Status new → closed
  • Version 3.0.4 → 2.5

This was fixed in #20807

Closing as duplicate.

#7 @DrewAPicture
13 years ago

  • Milestone Awaiting Review

#8 @c3mdigital
13 years ago

  • Keywords close removed

#9 @SergeyBiryukov
13 years ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.