Skip to content
Snippets Groups Projects
Commit 16f6e269 authored by Daniel Korte's avatar Daniel Korte Committed by Joao Ventura
Browse files

Issue #2976722 by Daniel Korte, jcnventura: Variable used before and during loop

parent 0135c2de
Branches
Tags
No related merge requests found
......@@ -342,13 +342,13 @@ function linked_field_entity_display_build_alter(array &$build, array $context)
}
// Normalize the settings.
$destination = $settings['destination'] ?? FALSE;
$destination_src = $settings['destination'] ?? FALSE;
$linked = $settings['linked'] ?? FALSE;
$destination_type = $settings['type'] ?? 'custom';
// If the destination field isn't filled for this field, we shouldn't
// do anything. Continue to the next field.
if (!$destination || !$linked) {
if (!$destination_src || !$linked) {
continue;
}
......@@ -360,7 +360,7 @@ function linked_field_entity_display_build_alter(array &$build, array $context)
}
foreach (Element::children($element) as $delta) {
$destination = $manager->getDestination($destination_type, $destination, $context);
$destination = $manager->getDestination($destination_type, $destination_src, $context);
// We need special handling for the token destination type.
if ($destination_type == 'custom') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment