diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 136f6dcdab..74d08bf634 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -776,6 +776,10 @@ function wp_read_image_metadata( $file ) { $iptc = @iptcparse( $info['APP13'] ); } + if ( ! is_array( $iptc ) ) { + $iptc = array(); + } + // Headline, "A brief synopsis of the caption". if ( ! empty( $iptc['2#105'][0] ) ) { $meta['title'] = trim( $iptc['2#105'][0] ); @@ -845,6 +849,10 @@ function wp_read_image_metadata( $file ) { $exif = @exif_read_data( $file ); } + if ( ! is_array( $exif ) ) { + $exif = array(); + } + if ( ! empty( $exif['ImageDescription'] ) ) { mbstring_binary_safe_encoding(); $description_length = strlen( $exif['ImageDescription'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 57bc39c334..16ce207640 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta3-53302'; +$wp_version = '6.0-beta3-53303'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.