[wp-trac] [WordPress Trac] #33172: Notice in get_bulk_actions() in certain conditions
WordPress Trac
noreply at wordpress.org
Wed Jul 29 12:01:17 UTC 2015
#33172: Notice in get_bulk_actions() in certain conditions
-----------------------------+-----------------------------
Reporter: CreativeJuiz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Quick/Bulk Edit | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
-----------------------------+-----------------------------
Hi there,
When a custom post type declaration is made with custom `capabilities`,
the `delete_posts` cap can be missing.
If it's the case, the `get_bulk_actions()` function create a PHP Notice
saying the following:
`Notice: Undefined property: stdClass::$delete_posts in /wordpress/wp-
admin/includes/class-wp-posts-list-table.php on line 251`
To prevent and avoid this notice, I simply use `isset()` to check the
definition. (see patch in attachment)
Thank you.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33172>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list