Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#20064 closed enhancement (fixed)

Editing a post of a non existing post type gives notices

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

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 15 years ago.

Download all attachments as: .zip

Change History (5)

@markoheijnen
15 years ago

#1 @ocean90
15 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review → 3.4

#2 follow-up: @nacin
14 years ago

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

#3 @duck_
14 years ago

  • Owner set to duck_
  • Resolution → fixed
  • Status new → closed

In [20623]:

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

#4 in reply to: ↑ 2 @duck_
14 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.