#21828 closed defect (bug) (duplicate)
ERR_NOTICE in wp_mime_type_icon
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.4.1 |
Component: | Gallery | Keywords: | has-patch |
Focuses: | Cc: |
Description
There's a bug in wp_mime_type_icon (wp-includes/post.php) which gives an ERR_NOTICE when a non-numeric mime-type is retrieved from the cache. The second line of the following code reproduces the error:
$icon1 = wp_mime_type_icon ('application/ogg'); // No cache, so no error $icon2 = wp_mime_type_icon ('application/ogg'); // Uses cache, so gives error
The full message is Notice: Undefined variable: post_id in D:\web\htdocs\wordpress\wp-includes\post.php on line 4127
The problem is obvious from the code and easy to fix. The attached patch does that.
Attachments (1)
Change History (6)
#2
@
13 years ago
- Keywords commit removed
- Milestone 3.5 deleted
- Resolution set to duplicate
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
#21835