Revert [30640], as it was incorrectly checking some filenames.
Built from https://develop.svn.wordpress.org/trunk@32171 git-svn-id: http://core.svn.wordpress.org/trunk@32146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2053,7 +2053,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];
|
||||
|
||||
Reference in New Issue
Block a user