[wp-trac] [WordPress Trac] #57021: Sanitize should accept broader types

WordPress Trac noreply at wordpress.org
Wed Feb 7 20:21:43 UTC 2024


#57021: Sanitize should accept broader types
------------------------------------------+------------------------------
 Reporter:  kkmuffme                      |       Owner:  (none)
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Formatting                    |     Version:  6.2
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch close dev-feedback  |     Focuses:
------------------------------------------+------------------------------

Comment (by kkmuffme):

 >The expectation here is that the caller should be doing this initial
 sanity check.

 Why? Like you say: this wouldn't be feasible for WP core, since it would
 require changes in 1000s of places. This PR ensures that it works fine
 everywhere in WP core and eventually also with PHP native types.

 Manually checking this everywhere, creates tons of redundant code for
 is_string checks in lots of places.

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


More information about the wp-trac mailing list