[wp-trac] [WordPress Trac] #64507: Fatal errors can ensue in WP_Query when requests are made with array query vars (was: Fatal error when author_name is not a string)
WordPress Trac
noreply at wordpress.org
Sat Jan 24 04:51:49 UTC 2026
#64507: Fatal errors can ensue in WP_Query when requests are made with array query
vars
--------------------------+-----------------------------
Reporter: leedxw | Owner: (none)
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Changes (by westonruter):
* keywords: has-patch => needs-patch
* owner: westonruter => (none)
* milestone: 7.0 => Future Release
Comment:
I opened a [https://github.com/WordPress/wordpress-develop/pull/10792 PR]
for the patch and I started iterating on it a bit more to account for
other query vars which may erroneously be arrays.
I'm sure there are many more query vars that need to be accounted for to
prevent possible fatal errors from bad requests. It seems strange to limit
the scope to `author_name` only when the error could occur for others. So
I'll leave this open for other to find more opportunities to harden
`WP_Query` in how the query vars are passed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64507#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list