diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigLoaderPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigLoaderPass.php index 940e2dc..fee8ed4 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigLoaderPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigLoaderPass.php @@ -45,7 +45,9 @@ public function process(ContainerBuilder $container) { // Sort the loaders by priority. Lower priority loaders are loaded later. foreach ($loaderIds as $id => $attributes) { - $priorities[$id] = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0; + foreach ($attributes as $attribute) { + $priorities[$id] = isset($attribute['priority']) ? $attribute['priority'] : 0; + } $loaders[$id] = $container->getDefinition($id); } array_multisort($priorities, SORT_DESC, $loaders);