Media: Tiny logic fix in `wp_image_file_matches_image_meta()` after [48329]. No need to look in `sizes` if the full size image path/URL matches.

See #50543.
Built from https://develop.svn.wordpress.org/trunk@48430


git-svn-id: http://core.svn.wordpress.org/trunk@48199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2020-07-10 23:06:04 +00:00
parent f06e883d01
commit af35cbeee8
2 changed files with 2 additions and 4 deletions

View File

@ -1522,9 +1522,7 @@ function wp_image_file_matches_image_meta( $image_location, $image_meta ) {
// Check if the relative image path from the image meta is at the end of $image_location.
if ( strrpos( $image_location, $image_meta['file'] ) === strlen( $image_location ) - strlen( $image_meta['file'] ) ) {
$match = true;
}
if ( ! empty( $image_meta['sizes'] ) ) {
} elseif ( ! empty( $image_meta['sizes'] ) ) {
// Retrieve the uploads sub-directory from the full size image.
$dirname = _wp_get_attachment_relative_path( $image_meta['file'] );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-beta1-48429';
$wp_version = '5.5-beta1-48430';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.