mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
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:
parent
bb5feb26d7
commit
bc58804ad3
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user