[wp-trac] [WordPress Trac] #39053: Add function `wp_validate_integer`

WordPress Trac noreply at wordpress.org
Mon Feb 27 21:25:07 UTC 2017


#39053: Add function `wp_validate_integer`
----------------------------------------------------+------------------
 Reporter:  peterwilsoncc                           |       Owner:
     Type:  enhancement                             |      Status:  new
 Priority:  normal                                  |   Milestone:  4.8
Component:  General                                 |     Version:
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch has-unit-tests needs-refresh  |     Focuses:
----------------------------------------------------+------------------

Comment (by peterwilsoncc):

 @dd32 you mentioned in passing elsewhere this may fail with 64 bit numbers
 on 32 bit systems. Do you have any suggestions on how to fix this.

 `if ( ! is_numeric( $var ) || floor( $var ) != $var )` is used currently
 used in core, so it will need to be removed if that's the problematic
 line.

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


More information about the wp-trac mailing list