Make WordPress Core

Opened 7 years ago

Closed 5 years ago

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

Download all attachments as: .zip

Change History (11)

7 years ago

Patch for Ticket #16106 - image.diff

#1 @4D4M
7 years ago

  • Cc wordpress@… added

#2 @hakre
7 years ago

Thanks for reporting the issue and providing a patch.

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

#3 @Otto42
7 years ago

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

#4 @solarissmoke
7 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.

7 years ago

Accept EXIF isoSpeedRatings as either array or string

#5 @solarissmoke
7 years ago

  • Keywords has-patch added; needs-patch removed

#6 @c3mdigital
5 years 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.

#7 @DrewAPicture
5 years ago

  • Milestone Awaiting Review deleted

#8 @c3mdigital
5 years ago

  • Keywords close removed

#9 @SergeyBiryukov
5 years ago

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