diff -u b/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php --- b/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -636,7 +636,9 @@ unset($cache[$hook]['preprocess functions']); } // Ensure uniqueness. - $cache[$hook]['preprocess functions'] = array_unique($cache[$hook]['preprocess functions']); + if (isset($cache[$hook]['preprocess functions'])) { + $cache[$hook]['preprocess functions'] = array_unique($cache[$hook]['preprocess functions']); + } } } reverted: --- b/core/modules/system/tests/modules/theme_test/templates/theme-test-preprocess-suggestions.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ foo }} reverted: --- b/core/themes/bartik/templates/theme-test-preprocess-suggestions--suggestion.html.twig +++ /dev/null @@ -1 +0,0 @@ -{{ foo }}