Opened 11 years ago
Last modified 7 years ago
#33172 new defect (bug)
Notice in get_bulk_actions() in certain conditions
| Reported by: | CreativeJuiz | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Quick/Bulk Edit | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch for class-wp-posts-list-table.php