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

WordPress Trac noreply at wordpress.org
Mon Nov 7 14:39:00 UTC 2022


#57021: Sanitize should accept broader types
------------------------------+-----------------------------
 Reporter:  kkmuffme          |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Formatting        |    Version:  trunk
 Severity:  normal            |   Keywords:
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 by default $_GET/$_POST can be string|array type.

 All sanitize functions accept only string, which makes it necessary to
 validate $_GET/$_POST for `is_string` all the time before calling sanitize
 function to avoid PHP notices.

 Instead sanitize function should accept mixed param and validate string
 internally.

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


More information about the wp-trac mailing list