Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#15511 closed defect (bug) (fixed)

Check for WP_Error earlier in edit_post

Reported by: alexdunae Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


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)

post.diff (657 bytes) - added by alexdunae 8 years ago.

Download all attachments as: .zip

Change History (5)

8 years ago

#1 @alexdunae
8 years ago

  • Cc alex@… added
  • Keywords has-patch added

#2 @nacin
8 years ago

  • Milestone changed from Awaiting Review to 3.1

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

#3 @nacin
8 years ago

#14334 closed as a duplicate.

#4 @nacin
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16761]) Move [14551] to after the is_wp_error check. see #13133, fixes #15511, props alexdunae.

Note: See TracTickets for help on using tickets.