#21828 closed defect (bug) (duplicate)
ERR_NOTICE in wp_mime_type_icon
| Reported by: | mark8barnes | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Gallery | Version: | 3.4.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
#21835