Skip to content

Commit

Permalink
Fix for address fields when value is an associative array matching ad…
Browse files Browse the repository at this point in the history
…dress field definition keys.
  • Loading branch information
daggerhart committed Jun 6, 2021
1 parent d5f9f1c commit 00d2161
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Drupal/Driver/Fields/Drupal8/AddressHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public function expand($values) {
$return[$k] = $value;
break;
}
// If the value array contains keys for the address fields array, use
// the keyed value.
else if (isset($value[$k])) {
$return[$k] = $value[$k];
continue;
}
if ($idx < count($value)) {
// Gracefully handle users providing too few field component values.
$return[$k] = $value[$idx];
Expand Down

0 comments on commit 00d2161

Please sign in to comment.