[wp-trac] [WordPress Trac] #22312: Notice for media attached to "retired" custom post type
WordPress Trac
noreply at wordpress.org
Tue May 7 11:16:59 UTC 2013
#22312: Notice for media attached to "retired" custom post type
--------------------------+------------------
Reporter: trepmal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Media | Version:
Severity: minor | Resolution:
Keywords: has-patch |
--------------------------+------------------
Comment (by SergeyBiryukov):
Replying to [comment:5 jtsternberg]:
> When the post that the attachment was attached to gets deleted, the
attachment table displays a lot of php notices: http://b.ustin.co/SD2T
FWIW, `wp_delete_post()` updates all the post attachments when a post is
deleted: [[BR]]
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-
includes/post.php#L2355
So the issue only happens if the post was deleted with a direct SQL query,
or is missing for some other reason (like a non-existent post type).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22312#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list