[wp-trac] [WordPress Trac] #54775: Allow int/float for esc_ functions

WordPress Trac noreply at wordpress.org
Mon Jan 10 12:57:43 UTC 2022

#54775: Allow int/float for esc_ functions
 Reporter:  malthert     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Security     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  coding-standards

Comment (by swissspidy):

 What's wrong with casting this yourself if you're dealing with ints and
 floats? e.g. `$num = 0; esc_html( (string) $num );`?

Ticket URL: <https://core.trac.wordpress.org/ticket/54775#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list