[wp-trac] [WordPress Trac] #16484: Attempting to add user with username "0" gives fatal error

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 8 00:03:51 UTC 2011


#16484: Attempting to add user with username "0" gives fatal error
--------------------------+-----------------------------
 Reporter:  markjaquith   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  lowest        |   Milestone:  Future Release
Component:  Users         |     Version:  3.1
 Severity:  minor         |  Resolution:
 Keywords:                |
--------------------------+-----------------------------

Comment (by nacin):

 empty('0') returns true, yes. But I don't think we overuse empty() as
 often you might think.

 In this case, it's the deluge of empty() checks in wp_insert_user. Really,
 these should be !isset() || !strlen(). Clunky, but they'd handle this
 instance.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16484#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list