WordPress.org

Make WordPress Core

Ticket #16693: 16693.2.diff

File 16693.2.diff, 537 bytes (added by sivel, 7 years ago)

Little variation on the patch

  • wp-admin/includes/media.php

     
    563563
    564564                // Set variables for storage
    565565                // fix file filename for query strings
    566                 preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches);
     566                preg_match('/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches);
    567567                $file_array['name'] = basename($matches[0]);
    568568                $file_array['tmp_name'] = $tmp;
    569569