Ticket #2622: capabilities.diff

File capabilities.diff, 496 bytes (added by denney, 6 years ago)
  • capabilities.php

     
    146146                $this->id = $this->ID; 
    147147                $this->cap_key = $table_prefix . 'capabilities'; 
    148148                $this->caps = &$this->{$this->cap_key}; 
    149                 if ( ! is_array($this->caps) ) 
     149                if ( ! is_array($this->caps) ) { 
    150150                        $this->caps = array(); 
     151                        $this->roles = array(); 
     152                        $this->set_role(get_settings('default_role')); 
     153                } 
    151154                $this->get_role_caps(); 
    152155        } 
    153156