diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 0f988a2dac62b..24dfef62f5b8a 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -1762,7 +1762,7 @@ function get_media_item( $attachment_id, $args = null ) { if ( 'image' === $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && post_type_supports( get_post_type( $calling_post_id ), 'thumbnail' ) - && get_post_thumbnail_id( $calling_post_id ) != $attachment_id + && get_post_thumbnail_id( $calling_post_id ) !== $attachment_id ) { $calling_post = get_post( $calling_post_id );