Don't try to read a non-existent Exif:Title tag in wp_read_image_metadata(), as it's not a part of the Exif standard.

props tyxla.
fixes #31043.

git-svn-id: https://develop.svn.wordpress.org/trunk@31462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-02-14 09:13:36 +00:00
parent 0653d029f2
commit 9b463c5a45

View File

@ -338,10 +338,6 @@ function wp_read_image_metadata( $file ) {
if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) {
$exif = @exif_read_data( $file );
if ( empty( $meta['title'] ) && ! empty( $exif['Title'] ) ) {
$meta['title'] = trim( $exif['Title'] );
}
if ( ! empty( $exif['ImageDescription'] ) ) {
mbstring_binary_safe_encoding();
$description_length = strlen( $exif['ImageDescription'] );