[wp-trac] [WordPress Trac] #47652: wp_dashboard_right_now() emits debug notices on unregistered core post types
WordPress Trac
noreply at wordpress.org
Thu Jul 4 20:43:43 UTC 2019
#47652: wp_dashboard_right_now() emits debug notices on unregistered core post
types
-------------------------------+------------------------------
Reporter: johnjamesjacoby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: | Focuses: administration
-------------------------------+------------------------------
Comment (by johnjamesjacoby):
Attached patch very simply avoids debug notices by removing the assumption
that `$num_posts->publish` will exist on a potential `stdClass` return
type.
To paint my own bike-shed, this could be part of a bigger effort to
support unregistering `_built_in` post types, but I don't think there is a
ton of interest in that at the moment, so this is a small way to clean
something up that (I think) should probably be done regardless.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47652#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list