Ticket #19222: fix-user-set-role-with-non-zero-index.diff
File fix-user-set-role-with-non-zero-index.diff, 486 bytes (added by , 14 years ago) |
---|
-
wp-includes/capabilities.php
721 721 foreach ( (array) $this->roles as $oldrole ) 722 722 unset( $this->caps[$oldrole] ); 723 723 724 if ( 1 == count( $this->roles ) && $role == $this->roles[0])724 if ( 1 == count( $this->roles ) && $role == current($this->roles) ) 725 725 return; 726 726 727 727 if ( !empty( $role ) ) {