[wp-trac] [WordPress Trac] #32056: wp_dropdown_roles() bug

WordPress Trac noreply at wordpress.org
Wed Apr 22 14:52:09 UTC 2015


#32056: wp_dropdown_roles() bug
-----------------------------+------------------------------
 Reporter:  InS0mN1aC        |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:  4.1.2
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  administration
-----------------------------+------------------------------

Comment (by InS0mN1aC):

 I know the difference and it is rather significant one. In my case I have
 a custom role called "s39d". If the comparison is made with == then when a
 user has this role the role is not preselected on the dropdown, instead
 another role is in its place. If I change it to === then it works
 normally. Apart from that, it is a good practice to use === when comparing
 strings in php.

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


More information about the wp-trac mailing list