mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00: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: https://develop.svn.wordpress.org/trunk@21782 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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");
|
||||
|
||||
$post_id = 0;
|
||||
if ( empty($icon) ) {
|
||||
$post_id = 0;
|
||||
$post_mimes = array();
|
||||
if ( is_numeric($mime) ) {
|
||||
$mime = (int) $mime;
|
||||
|
||||
Reference in New Issue
Block a user