Make WordPress Core


Ignore:
Timestamp:
09/16/2012 04:24:33 PM (13 years ago)
Author:
nacin
Message:

Don't use hard-coded indexes when dealing with an array of roles. props elyobo. fixes #19222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r21563 r21866  
    787787            unset( $this->caps[$oldrole] );
    788788
    789         if ( 1 == count( $this->roles ) && $role == $this->roles[0] )
     789        if ( 1 == count( $this->roles ) && $role == current( $this->roles ) )
    790790            return;
    791791
Note: See TracChangeset for help on using the changeset viewer.