youre messing with stuff that you shouldnt be messing with:
the original function is defined and used inside schema.php and theres nothing wrong with it or the original file.
wp-admin/includes/upgrade.php:
function upgrade_270() {
global $wpdb, $wp_current_db_version;
if ( $wp_current_db_version < 8980 )
populate_roles_270();
wp-admin/includes/schema.php:
function populate_roles() {
populate_roles_160();
populate_roles_210();
populate_roles_230();
populate_roles_250();
populate_roles_260();
populate_roles_270();
}
function populate_roles_270() {
$role = get_role( 'administrator' );
if ( !empty( $role ) ) {
$role->add_cap( 'install_plugins' );
$role->add_cap( 'update_themes' );
}
}
as was previously told to you, your file is incomplete, and instead of changing the code, you needed to upload a fresh. complete, file.