Make WordPress Core

Opened 20 months ago

Last modified 20 months ago

#49478 new defect (bug)

get_post_type_object has the wrong type of validator for its parameter

Reported by: 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 20 months ago.
Change type of check to be sure params is a string

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
20 months ago

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

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

20 months ago

Change type of check to be sure params is a string

#2 @sebastienserre
20 months ago

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