WordPress.org

Make WordPress Core

Ticket #10285: 10285.diff

File 10285.diff, 548 bytes (added by Denis-de-Bernardy, 12 years ago)
  • wp-includes/capabilities.php

     
    565565         * @param string $role Role name.
    566566         */
    567567        function remove_role( $role ) {
    568                 if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1 ) )
     568                if ( empty( $this->caps[$role] ) || ( count( $this->roles ) <= 1 ) )
    569569                        return;
    570570                unset( $this->caps[$role] );
    571571                update_usermeta( $this->ID, $this->cap_key, $this->caps );