Opened 15 months ago

Closed 13 months ago

Last modified 13 months 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: Post Types Version: 3.0
Severity: minor Keywords: has-patch
Cc: markoheijnen

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 months ago.

Download all attachments as: .zip

Change History (5)

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

comment:2 follow-up: ↓ 4   nacin13 months ago

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

  • 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.

comment:4 in reply to: ↑ 2   duck_13 months 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.