﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
22312	"Notice for media attached to ""retired"" custom post type"	trepmal	SergeyBiryukov	"If there are attachments in the Media Library that are attached to non-existant post types, a few ugly notices will appear:

`Notice: Trying to get property of non-object in /path/to/wp-includes/capabilities.php on line 1080`

`Notice: Trying to get property of non-object in /path/to/wp-includes/capabilities.php on line 1081`

`Notice: Trying to get property of non-object in /path/to/wp-includes/capabilities.php on line 1081`

`Notice: Trying to get property of non-object in /path/to/wp-includes/capabilities.php on line 1084`

`Notice: Trying to get property of non-object in /path/to/wp-includes/capabilities.php on line 1084`

[[Image(http://cdn.dropmark.com/17023/0b51ddeeb3862946e6c6977438a5bdcc12948d2f/2012-10-28_0836.png)]]

I've included a patch, but I'm sure it's not the optimal solution.

Not sure if there should there be some way to indicate to the user that the attachment's post_parent is a ""retired"" post type"	defect (bug)	closed	normal	3.6	Media		minor	fixed	has-patch	justin@… sabreuse
