diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index a0af702..7c9f4d1 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -2,6 +2,7 @@ namespace Drupal\Core\Theme; +use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\DestructableInterface; @@ -568,7 +569,7 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path) } // Merge the newly created theme hooks into the existing cache. - $cache = $result + $cache; + $cache = NestedArray::mergeDeep($cache, $result); } // Let themes have variable preprocessors even if they didn't register a