[wp-trac] [WordPress Trac] #63427: User roles property should always be an array, but they sometimes become an object in localized data

WordPress Trac noreply at wordpress.org
Mon Nov 10 07:09:08 UTC 2025


#63427: User roles property should always be an array, but they sometimes become an
object in localized data
-------------------------------------------------+-------------------------
 Reporter:  haruncpi                             |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.9
Component:  Users                                |     Version:  2.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-test-info has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by haruncpi):

 * keywords:  has-patch has-test-info has-unit-tests changes-requested =>
     has-patch has-test-info has-unit-tests


Comment:

 @wildworks
 Thanks! I’ve updated the PR with all the requested changes except one.
 I’ve also added an explanation for why a simple foreach loop was used
 instead of array_values() — mainly for performance and clarity reasons, as
 suggested by @SirLouen in this commit  [https://github.com/WordPress
 /wordpress-
 develop/pull/8790/commits/4e32ecf82553567ffc7598296a04490dda85c95b]

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


More information about the wp-trac mailing list