[wp-trac] [WordPress Trac] #58234: sanitize_title_with_dashes fatal error when query var value is an array in php 8
WordPress Trac
noreply at wordpress.org
Tue Aug 8 23:23:11 UTC 2023
#58234: sanitize_title_with_dashes fatal error when query var value is an array in
php 8
-------------------------------------------------+-------------------------
Reporter: mouhdev | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests php80 | Focuses:
reporter-feedback |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
Replying to [comment:6 hellofromTonya]:
> It might be a doing it wrong or potentially a case for further defensive
coding. Thus, the `php-compatibility` focus should not be added to the
ticket.
I think this is similar to #56311 in which site visitor input via the
URL/form data also triggers a notice (in the other ticket's case, it's an
out of range week, `example.com/2022/?w=506`).
I think it's a case in which a bunch of defensive coding needs to be added
to the `WP` class to validate data before sending it to `WP_Query`.
Throwing a notice in those cases isn't helpful to the site developer as
they have no control over visitor data submitted via a URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58234#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list