[wp-trac] [WordPress Trac] #13317: Code Impriovement in get_userdata

WordPress Trac wp-trac at lists.automattic.com
Wed May 12 19:26:16 UTC 2010

#13317: Code Impriovement in get_userdata
 Reporter:  hakre         |        Owner:        
     Type:  defect (bug)  |       Status:  closed
 Priority:  lowest        |    Milestone:  3.0   
Component:  General       |      Version:        
 Severity:  normal        |   Resolution:  fixed 
 Keywords:  has-patch     |  
Changes (by nacin):

  * status:  reopened => closed
  * resolution:  => fixed


 If the user_id is nonnumeric for some reason, that will absint() to 0 and
 thus compute to false. Moving the absint down would break that. I find !
 $user_id easier to read. Yes, 0 == $user_id works, and perhaps is more
 clear with absint. I'm not inclined to change this again.

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

More information about the wp-trac mailing list