WordPress.org

Make WordPress Core

Ticket #35480: 35480.patch

File 35480.patch, 621 bytes (added by jaspermdegroot, 4 years ago)
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index 6b0187a..8a5b548 100644
    function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac 
    10601060         */
    10611061        foreach ( $image_sizes as $image ) {
    10621062
     1063                // Check if image meta isn't corrupted.
     1064                if ( ! is_array( $image ) || 1 > strpos( $image['file'], '.' ) ) {
     1065                        continue;
     1066                }
     1067
    10631068                // If the file name is part of the `src`, we've confirmed a match.
    10641069                if ( ! $src_matched && false !== strpos( $image_src, $dirname . $image['file'] ) ) {
    10651070                        $src_matched = true;