Ticket #1509 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

typos in is_role() and get_userdata()

Reported by: mdawaffe Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 1.6
Severity: trivial Keywords: typo capabilities is_role get_userdata
Cc:

Description

There's a small typo in some of the new capabilities code, and one in get_userdata() as well:

Index: wp-includes/capabilities.php
===================================================================
--- wp-includes/capabilities.php        (revision 2707)
+++ wp-includes/capabilities.php        (working copy)
@@ -62,9 +62,9 @@
                return $this->role_names;
        }
 
-       function is_role($caps)
+       function is_role($role)
        {
-               return empty($this->role_names[$cap]);
+               return empty($this->role_names[$role]);
        }       
 }
 
Index: wp-includes/pluggable-functions.php
===================================================================
--- wp-includes/pluggable-functions.php (revision 2707)
+++ wp-includes/pluggable-functions.php (working copy)
@@ -52,7 +52,7 @@
        }
 
        $cache_userdata[$user_id] = $user;
-       $cache_userdata[$cache_userdata[$userid]->user_login] =& $cache_userdata[$user_id];
+       $cache_userdata[$cache_userdata[$user_id]->user_login] =& $cache_userdata[$user_id];
 
        return $cache_userdata[$user_id];
 }

Change History

07/14/05 22:58:59 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [2711]) Fix typos in is_role() and get_userdata(). fixes #1509 Props: mdawaffe