Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20064 closed enhancement (fixed)

Editing a post of a non existing post type gives notices

Reported by: markoheijnen's profile markoheijnen Owned by: duck_'s profile duck_
Milestone: 3.4 Priority: normal
Severity: minor Version: 3.0
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:

Description

When you try to edit a post where the post type doesn't exists anymore you will get notices since the post type check is later then the capability check. Not a big thing tho.

Attachments (1)

20064.patch (958 bytes) - added by markoheijnen 13 years ago.

Download all attachments as: .zip

Change History (5)

@markoheijnen
13 years ago

#1 @ocean90
13 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.4

#2 follow-up: @nacin
13 years ago

Seems fine, but can you actually "edit" a revision?

#3 @duck_
13 years ago

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

In [20623]:

Check that $post_type_object exists before accessing its properties. Props markoheijnen. Fixes #20064.

#4 in reply to: ↑ 2 @duck_
13 years ago

Replying to nacin:

Seems fine, but can you actually "edit" a revision?

Yes, but bad things happen. Per IRC: "surely this shouldn't be allowed?" -> put it on another ticket.

Note: See TracTickets for help on using tickets.