#27439 closed defect (bug) (fixed)
Warning on WP Media List Table when Custom Post Type No Longer Active
Reported by: | wpsmith | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Media | Keywords: | has-patch dev-feedback |
Focuses: | administration | Cc: |
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
@
11 years ago
- Component changed from Administration to Media
- Milestone changed from Awaiting Review to 3.9
- Version changed from trunk to 3.7
#3
@
11 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 27560:
#5
follow-up:
↓ 6
@
11 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.
First pass