[wp-trac] [WordPress Trac] #5520: incorrect type for default arg in add_role()

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 23 23:07:39 GMT 2007


#5520: incorrect type for default arg in add_role()
------------------------+---------------------------------------------------
 Reporter:  tellyworth  |       Owner:  anonymous
     Type:  defect      |      Status:  new      
 Priority:  normal      |   Milestone:  2.5      
Component:  General     |     Version:           
 Severity:  normal      |    Keywords:  has-patch
------------------------+---------------------------------------------------
 The add_role() function uses a string as the default $capabilities
 argument.  Other code assumes it's an array.  This causes a warning in
 get_role_caps() if the default is used.

 The patch changes the default to an empty array.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5520>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list