Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#58234 new defect (bug)

sanitize_title_with_dashes fatal error when query var value is an array in php 8

Reported by: mouhdev's profile mouhdev Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: Bootstrap/Load Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

Using latest WordPress development version 6.3-alpha-55505-src, when submitting a form with field values that are array, and the array key is one of WordPress query vars, that causing sanitize error for 'post_name' parameter in get_posts function.

Example to replicate:

  • make sure to register custom post type E.g custom_post_type.
  • submit the following form on your test WordPress website.
    <form method="post" action="">
    <input type="text" name="custom_post_type['post_title']" value="This is a test post">
    <input type="submit" value="Send">
    </form>
    

Attachments (1)

58234.diff (761 bytes) - added by mouhdev 5 weeks ago.

Download all attachments as: .zip

Change History (2)

@mouhdev
5 weeks ago

#1 @mouhdev
5 weeks ago

  • Summary changed from sanitize_title_with_dashes fatal error when query var value is an array to sanitize_title_with_dashes fatal error when query var value is an array in php 8
Note: See TracTickets for help on using tickets.