Opened 2 years ago
Closed 2 years ago
#15511 closed defect (bug) (fixed)
Check for WP_Error earlier in edit_post
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | alex@… |
Description
When working with custom post types where I hadn't assign the edit_others capabilities, _wp_translate_postdata was returning WP_Error.
edit_post checks for WP_Error, but not before assuming that the return value is actually array and triggering an ugly error.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.

Sure, looks good. Will want to blame the surrounding code to see why that got inserted.