diff --git a/migrate_plus.module b/migrate_plus.module index d7aa25f135140861819daa9b8f40a589551c590c..fdb00df9c8c8d2daa6c97879039820f028f4dd9f 100644 --- a/migrate_plus.module +++ b/migrate_plus.module @@ -61,7 +61,7 @@ function migrate_plus_migration_plugins_alter(array &$migrations) { continue; } foreach ($shared_configuration as $key => $group_value) { - $migration_value = $migrations[$id][$key]; + $migration_value = $migrations[$id][$key] ?? NULL; // Where both the migration and the group provide arrays, replace // recursively (so each key collision is resolved in favor of the // migration). diff --git a/tests/src/Kernel/MigrationGroupTest.php b/tests/src/Kernel/MigrationGroupTest.php index f707f5bb22706fe81efb252ba29e4a02df2aa012..eb62bb4547b23c435f07c8b24d5301d095267781 100644 --- a/tests/src/Kernel/MigrationGroupTest.php +++ b/tests/src/Kernel/MigrationGroupTest.php @@ -30,6 +30,7 @@ class MigrationGroupTest extends KernelTestBase { 'shared_configuration' => [ // In migration, so will be overridden. 'migration_tags' => ['Drupal 6'], + 'audit' => TRUE, 'source' => [ 'constants' => [ // Not in migration, so will be added. @@ -52,7 +53,7 @@ class MigrationGroupTest extends KernelTestBase { 'load' => [], 'migration_group' => $group_id, 'label' => 'Unaffected by the group', - // Overrides group. + // Overrides group. 'migration_tags' => ['Drupal 7'], 'destination' => [], 'source' => [], @@ -74,6 +75,7 @@ class MigrationGroupTest extends KernelTestBase { $expected_config = [ 'label' => 'Unaffected by the group', 'getMigrationTags' => ['Drupal 7'], + 'isAuditable' => TRUE, 'getSourceConfiguration' => [ 'plugin' => 'empty', 'constants' => [