WordPress.org

Make WordPress Core

Ticket #37608: 37608.2.diff

File 37608.2.diff, 619 bytes (added by jeremyfelt, 3 years ago)
  • src/wp-admin/includes/media.php

     
    284284        if ( isset($file['error']) )
    285285                return new WP_Error( 'upload_error', $file['error'] );
    286286
    287         $basename = pathinfo( $name, PATHINFO_BASENAME );
     287        $filename = pathinfo( $name, PATHINFO_FILENAME );
    288288
    289289        $url = $file['url'];
    290290        $type = $file['type'];
    291291        $file = $file['file'];
    292         $title = sanitize_title( $basename );
     292        $title = sanitize_title( $filename );
    293293        $content = '';
    294294        $excerpt = '';
    295295