Revert [30640], as it was incorrectly checking some filenames. This merges [32171] in the 4.1 branch.

See #30377.


Built from https://develop.svn.wordpress.org/branches/4.1@32172


git-svn-id: http://core.svn.wordpress.org/branches/4.1@32147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-04-20 06:44:23 +00:00
parent bb5feb26d7
commit bc58804ad3

View File

@ -2049,7 +2049,7 @@ function wp_check_filetype( $filename, $mimes = null ) {
$ext = false;
foreach ( $mimes as $ext_preg => $mime_match ) {
$ext_preg = '!\.(' . $ext_preg . ')(\?.*)?$!i';
$ext_preg = '!\.(' . $ext_preg . ')$!i';
if ( preg_match( $ext_preg, $filename, $ext_matches ) ) {
$type = $mime_match;
$ext = $ext_matches[1];