mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
Fix mimes empty check
git-svn-id: http://svn.automattic.com/wordpress/trunk@12171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a77fc75cd
commit
3df56a9360
@ -2260,7 +2260,7 @@ function wp_ext2type( $ext ) {
|
|||||||
* @return array Values with extension first and mime type.
|
* @return array Values with extension first and mime type.
|
||||||
*/
|
*/
|
||||||
function wp_check_filetype( $filename, $mimes = null ) {
|
function wp_check_filetype( $filename, $mimes = null ) {
|
||||||
if ( null === $mimes )
|
if ( empty($mimes) )
|
||||||
$mimes = get_allowed_mime_types();
|
$mimes = get_allowed_mime_types();
|
||||||
$type = false;
|
$type = false;
|
||||||
$ext = false;
|
$ext = false;
|
||||||
@ -2340,6 +2340,7 @@ function get_allowed_mime_types() {
|
|||||||
|
|
||||||
return $mimes;
|
return $mimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve nonce action "Are you sure" message.
|
* Retrieve nonce action "Are you sure" message.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user