WordPress.org

Make WordPress Core

Ticket #3705: capabilities.php.diff

File capabilities.php.diff, 669 bytes (added by McShelby, 11 years ago)
  • wp-includes/capabilities.php

     
    5555                unset($this->role_objects[$role]); 
    5656                unset($this->role_names[$role]); 
    5757                unset($this->roles[$role]); 
    58                  
     58 
    5959                if ( $this->use_db ) 
    6060                        update_option($this->role_key, $this->roles); 
    6161        } 
     
    427427                } 
    428428 
    429429                $author_data = get_userdata($user_id); 
    430                 $page_author_data = get_userdata($post->post_author); 
     430                $page_author_data = get_userdata($page->post_author); 
    431431                if ($user_id == $page_author_data->ID) 
    432432                        $caps[] = 'read'; 
    433433                else