Make WordPress Core

Opened 4 years ago

Closed 20 months ago

Last modified 20 months ago

#16106 closed defect (bug) (duplicate)

Error reading EXIF data from uploaded image

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


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 4 years ago.
Patch for Ticket #16106 - image.diff
16106.diff (856 bytes) - added by solarissmoke 4 years ago.
Accept EXIF isoSpeedRatings as either array or string

Download all attachments as: .zip

Change History (11)

@4D4M4 years ago

Patch for Ticket #16106 - image.diff

comment:1 @4D4M4 years ago

  • Cc wordpress@… added

comment:2 @hakre4 years ago

Thanks for reporting the issue and providing a patch.

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

comment:3 @Otto424 years ago

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

comment:4 @solarissmoke4 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:

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.

@solarissmoke4 years ago

Accept EXIF isoSpeedRatings as either array or string

comment:5 @solarissmoke4 years ago

  • Keywords has-patch added; needs-patch removed

comment:6 @c3mdigital20 months ago

  • Keywords close added; has-patch removed
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from 3.0.4 to 2.5

This was fixed in #20807

Closing as duplicate.

comment:7 @DrewAPicture20 months ago

  • Milestone Awaiting Review deleted

comment:8 @c3mdigital20 months ago

  • Keywords close removed

comment:9 @SergeyBiryukov20 months ago

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