diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index b2a94b0..7d54a5a 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -474,7 +474,7 @@ public function importChange($name, Config $new_config, Config $old_config) { } foreach ($new_config->get() as $property => $value) { - $entity->$property = $value; + $entity->set($property, $value); } $entity->save(); @@ -495,7 +495,7 @@ public function importChange($name, Config $new_config, Config $old_config) { * A configuration object containing the old configuration data. */ public function importDelete($name, Config $new_config, Config $old_config) { - list(, , $id) = explode('.', $name); + list(, , $id) = explode('.', $name, 3); $entities = $this->load(array($id)); $entity = $entities[$id]; $entity->delete(); diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 4500c9b..60aa7ff 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1964,15 +1964,17 @@ function user_role_grant_permissions($rid, array $permissions = array()) { $modules = user_permission_get_modules(); // Grant new permissions for the role. foreach ($permissions as $name) { - db_merge('role_permission') - ->key(array( - 'rid' => $rid, - 'permission' => $name, - )) - ->fields(array( - 'module' => $modules[$name], - )) - ->execute(); + if (isset($modules[$name])) { + db_merge('role_permission') + ->key(array( + 'rid' => $rid, + 'permission' => $name, + )) + ->fields(array( + 'module' => $modules[$name], + )) + ->execute(); + } } // Clear the user access cache.