Skip to content
Snippets Groups Projects
Commit fd974be0 authored by Andy Whale's avatar Andy Whale
Browse files

Issue #3320681 by scott_euser: Sometimes NULL values are sent to Core's Token...

Issue #3320681 by scott_euser: Sometimes NULL values are sent to Core's Token replacement service causing PHP8 notice
parent c128ac40
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ function token_default_tokens_alter(array &$replacements, array $context, Bubble
return;
}
$replacements = \Drupal::service('token_default.manager')->replaceMissingTokensWithDefaults($replacements, $context);
$replacements = array_filter($replacements);
// Allows using another token as replacement value but prevent endless loop.
$recursive_calls = $context['data']['recursive_calls'] ?? 0;
$recursive_limit = \Drupal::config('token_default.settings')->get('recursive_limit') ?? SettingsForm::DEFAULT_RECURSIVE_LIMIT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment