Opened 11 years ago
Last modified 7 years ago
#33172 new defect (bug)
Notice in get_bulk_actions() in certain conditions
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Quick/Bulk Edit | Keywords: | |
| Focuses: | administration | Cc: |
Description
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.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Patch for class-wp-posts-list-table.php