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 @@ -603,7 +603,7 @@ // @see https://www.drupal.org/node/2457295 if (isset($cache[$previous_hook]) && !isset($cache[$previous_hook]['incomplete preprocess functions'])) { $cache[$hook] = $incomplete_previous_hook + $cache[$previous_hook]; - if (!empty($incomplete_previous_hook['preprocess functions'])) { + if (isset($incomplete_previous_hook['preprocess functions']) && isset($cache[$previous_hook]['preprocess functions'])) { $diff = array_diff($incomplete_previous_hook['preprocess functions'], $cache[$previous_hook]['preprocess functions']); $cache[$hook]['preprocess functions'] = array_merge($cache[$previous_hook]['preprocess functions'], $diff); }