diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index cad220c..155246d 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -170,16 +170,14 @@ protected function getDefinitionWithReplacements($base_plugin_id, array $replace // Replace dynamic portions of the definition type. if (!empty($replacements) && strpos($definition['type'], ']')) { - $sub_type = $this->determineType($this->replaceName($definition['type'], $replacements), $definitions); + $type = $this->determineType($this->replaceName($definition['type'], $replacements), $definitions); // Merge the newly determined subtype definition with the original // definition. - $definition = NestedArray::mergeDeepArray([$definitions[$sub_type], $definition], TRUE); - } - else { - // Unset type so we try the merge only once per type. - unset($definition['type']); - $this->definitions[$type] = $definition; + $definition = NestedArray::mergeDeepArray([$definitions[$type], $definition], TRUE); } + // Unset type so we try the merge only once per type. + unset($definition['type']); + $this->definitions[$type] = $definition; } // Add type and default definition class. $definition += array(