Make WordPress Core

Changeset 31119


Ignore:
Timestamp:
01/10/2015 04:54:13 AM (10 years ago)
Author:
wonderboymusic
Message:

In wp_ajax_upload_attachment(), wp_check_filetype_and_ext() doesn't need a 3rd param - it already defaults to null. Passing false would fail a strict check

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r31090 r31119  
    18591859    // If the context is custom header or background, make sure the uploaded file is an image.
    18601860    if ( isset( $post_data['context'] ) && in_array( $post_data['context'], array( 'custom-header', 'custom-background' ) ) ) {
    1861         $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'], false );
     1861        $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'] );
    18621862        if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) {
    18631863            wp_send_json_error( array(
Note: See TracChangeset for help on using the changeset viewer.