[wp-trac] [WordPress Trac] #41450: sanitize_text_field() assumes the field is a string

WordPress Trac noreply at wordpress.org
Thu Feb 7 23:34:27 UTC 2019


#41450: sanitize_text_field() assumes the field is a string
--------------------------+---------------------
 Reporter:  johnbillion   |       Owner:  pento
     Type:  defect (bug)  |      Status:  closed
 Priority:  low           |   Milestone:  5.1
Component:  Formatting    |     Version:  2.9
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------
Changes (by pento):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44731" 44731]:
 {{{
 #!CommitTicketReference repository="" revision="44731"
 Formatting: Loosen the type checking in `_sanitize_text_fields()`.

 [44618] added strict type checking to `_sanitize_text_fields()`, which has
 caused some compat issues with plugins.

 We can loosen the type checking to only reject objects and arrays, and
 cast other types to string.

 Props Nick_theGeek, pento.
 Fixes #41450.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41450#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list