WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#1509 closed defect (bug) (fixed)

typos in is_role() and get_userdata()

Reported by: mdawaffe Owned by:
Milestone: Priority: normal
Severity: trivial Version: 1.6
Component: Administration Keywords: typo capabilities is_role get_userdata
Focuses: 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 (1)

comment:1 ryan9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.