[wp-trac] [WordPress Trac] #16974: absint to return 0 for values with non-numeric characters

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 26 22:15:58 UTC 2011

#16974: absint to return 0 for values with non-numeric characters
 Reporter:  sc0ttkclark   |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.1
 Severity:  minor         |  Resolution:  wontfix
 Keywords:  has-patch     |
Changes (by westi):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


 I don't see a valid reason for changing this.

 In fact I see more valid reasons for keeping what we have.

 I would much rather that: http://wordpress.org/news/?p=100test still
 worked than didn't work and I don't want to possibly break a whole load of
 plugin / theme code just to chage this function to work how you think it
 should work rather than how it works.

 PHP is by design a loosely typed language and WP itself lives within this
 loosely typed world.

 The whole point of absint is to make sure that the thing you are treating
 as an integer really is treated as an integer not a string so that when
 you later use this value you get what you expect.

Ticket URL: <http://core.trac.wordpress.org/ticket/16974#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list