diff --git a/wp-includes/feed.php b/wp-includes/feed.php index d56ce8b18e..0b84cc10a5 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -526,17 +526,17 @@ function atom_enclosure() { $mimes = get_allowed_mime_types(); - // Parse url + // Parse URL. if ( isset( $enclosure[0] ) && is_string( $enclosure[0] ) ) { $url = trim( $enclosure[0] ); } - // Parse length and type - foreach ( range( 1, 2 ) as $i ) { + // Parse length and type. + for ( $i = 1; $i <= 2; $i++ ) { if ( isset( $enclosure[ $i ] ) ) { if ( is_numeric( $enclosure[ $i ] ) ) { $length = trim( $enclosure[ $i ] ); - } elseif ( in_array( $enclosure[ $i ], $mimes ) ) { + } elseif ( in_array( $enclosure[ $i ], $mimes, true ) ) { $type = trim( $enclosure[ $i ] ); } } @@ -548,6 +548,7 @@ function atom_enclosure() { esc_attr( $length ), esc_attr( $type ) ); + /** * Filters the atom enclosure HTML link tag for the current post. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 28c2bfab8a..a78e1950d7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta1-48434'; +$wp_version = '5.5-beta1-48435'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.