Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#49478 new defect (bug)

get_post_type_object has the wrong type of validator for its parameter

Reported by: kamilkecki's profile kamilkecki Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Posts, Post Types Keywords: has-patch needs-testing 2nd-opinion
Focuses: Cc:


get_post_type_object expects a post type as a string as its parameter, however it checks if the parameter is scalar or not and returns null if it is not a number.

Attachments (1)

49748.diff (582 bytes) - added by sebastienserre 4 years ago.
Change type of check to be sure params is a string

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
4 years ago

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Just adding a link to the related changeset here: [34100] / #30013.

4 years ago

Change type of check to be sure params is a string

#2 @sebastienserre
4 years ago

  • Keywords has-patch needs-testing 2nd-opinion added; needs-patch removed
Note: See TracTickets for help on using tickets.