[wp-trac] [WordPress Trac] #41450: sanitize_text_field() assumes the field is a string
WordPress Trac
noreply at wordpress.org
Wed Jul 26 16:15:43 UTC 2017
#41450: sanitize_text_field() assumes the field is a string
--------------------------+-------------------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: Formatting | Version: 2.9
Severity: normal | Keywords: needs-patch 2nd-opinion
Focuses: |
--------------------------+-------------------------------------
The `sanitize_text_field()` sanitisation function is used to sanitize text
input, but the function actually assumes the field is a string. If an
array is passed in, for example, then it'll raise PHP errors.
This function should gracefully handle not string data, probably by
returning an empty string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41450>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list