diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 9d63694031..a5d81d9a44 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -283,7 +283,9 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override if ( isset($file['error']) ) return new WP_Error( 'upload_error', $file['error'] ); - $name = pathinfo( $_FILES[$file_id]['name'], PATHINFO_FILENAME ); + $name = $_FILES[$file_id]['name']; + $ext = pathinfo( $name, PATHINFO_EXTENSION ); + $name = wp_basename( $name, ".$ext" ); $url = $file['url']; $type = $file['type']; diff --git a/wp-includes/version.php b/wp-includes/version.php index 3ed191d96b..8fb76ce701 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38672'; +$wp_version = '4.7-alpha-38673'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.