From 44a3c002f5b2619334c247738a5f874a160f8496 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 10 Jan 2015 04:54:13 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@31119 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 7af476ea4f..f17f1a8cad 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -1858,7 +1858,7 @@ function wp_ajax_upload_attachment() { // If the context is custom header or background, make sure the uploaded file is an image. if ( isset( $post_data['context'] ) && in_array( $post_data['context'], array( 'custom-header', 'custom-background' ) ) ) { - $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'], false ); + $wp_filetype = wp_check_filetype_and_ext( $_FILES['async-upload']['tmp_name'], $_FILES['async-upload']['name'] ); if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) { wp_send_json_error( array( 'message' => __( 'The uploaded file is not a valid image. Please try again.' ),