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. Built from https://develop.svn.wordpress.org/trunk@31462 git-svn-id: http://core.svn.wordpress.org/trunk@31443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
542a4bd98b
commit
19a43125cd
|
@ -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 ) ) ) ) {
|
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 );
|
$exif = @exif_read_data( $file );
|
||||||
|
|
||||||
if ( empty( $meta['title'] ) && ! empty( $exif['Title'] ) ) {
|
|
||||||
$meta['title'] = trim( $exif['Title'] );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! empty( $exif['ImageDescription'] ) ) {
|
if ( ! empty( $exif['ImageDescription'] ) ) {
|
||||||
mbstring_binary_safe_encoding();
|
mbstring_binary_safe_encoding();
|
||||||
$description_length = strlen( $exif['ImageDescription'] );
|
$description_length = strlen( $exif['ImageDescription'] );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-alpha-31461';
|
$wp_version = '4.2-alpha-31462';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue