[wp-trac] [WordPress Trac] #54160: sanitize_key() / _wp_customize_include() is not able to handle non-scalar values

WordPress Trac noreply at wordpress.org
Fri Dec 10 20:41:06 UTC 2021


#54160: sanitize_key() / _wp_customize_include() is not able to handle non-scalar
values
----------------------------------------+-----------------------------
 Reporter:  dd32                        |       Owner:  hellofromTonya
     Type:  defect (bug)                |      Status:  reopened
 Priority:  normal                      |   Milestone:  5.9
Component:  Formatting                  |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by hellofromTonya):

 @wppunk As documented, `sanitize_key()` expects the key given to be a
 string data type. The data type check is part of the input validation to
 ensure the incoming value is of string before passing it to native PHP
 functions that expect and require a string value.

 Question: Can you share the use case where an integer value needs to be
 sanitized?

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


More information about the wp-trac mailing list