mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-10 18:37:58 +01:00
Ensure $post_id is defined in wp_mime_type_icon() to prevent notices when a valid mime type string is provided. see #21835.
git-svn-id: http://core.svn.wordpress.org/trunk@21782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aa543734b8
commit
50b120ad64
@ -4150,8 +4150,9 @@ function wp_attachment_is_image( $post_id = 0 ) {
|
||||
function wp_mime_type_icon( $mime = 0 ) {
|
||||
if ( !is_numeric($mime) )
|
||||
$icon = wp_cache_get("mime_type_icon_$mime");
|
||||
if ( empty($icon) ) {
|
||||
|
||||
$post_id = 0;
|
||||
if ( empty($icon) ) {
|
||||
$post_mimes = array();
|
||||
if ( is_numeric($mime) ) {
|
||||
$mime = (int) $mime;
|
||||
|
Loading…
Reference in New Issue
Block a user