#27439 closed defect (bug) (fixed)
Warning on WP Media List Table when Custom Post Type No Longer Active
| Reported by: | wpsmith | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.9 |
| Component: | Media | Version: | 3.7 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | Focuses: | administration |
Description
Currently, with a custom post type that no longer exists, a Media object that is attached to a post in that custom post type throws a warning.
Screenshot
To Repeat Warning:
- Create a custom post type via functions.php or a plugin.
- Create a new post
- Upload an image to that custom post type as a featured image
- Comment custom post type code in functions.php or deactivate plugin.
- Go to Media Library (domain.com/wp-admin/upload.php)
You will see the warning in the Uploaded to column.
Attachments (2)
Change History (9)
#2
@
12 years ago
- Component Administration → Media
- Milestone Awaiting Review → 3.9
- Version trunk → 3.7
#5
follow-up:
↓ 6
@
12 years ago
sorry Sergey, maybe I'm in a dumb moment but I still can see those PHP notices.. please check attached screenshot, where you can see I'm testing on trunk 27615.
Just checking capabilities.php on line 1112, seems to me that $post_type at that point is NULL, and that's (and following lines) the reason for the notices.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
First pass