diff -u b/src/Element/Country.php b/src/Element/Country.php --- b/src/Element/Country.php +++ b/src/Element/Country.php @@ -87,7 +87,8 @@ // Rebuild country options if any preferred countries have been selected. // @todo In the views filter, preferred countries are an associative array // which is nicer to handle. See if this can be further streamlined. - $preferred_countries = array_combine($element['#preferred_countries'], $element['#preferred_countries']); + $preferred_countries = $element['#preferred_countries'] ?? []; + $preferred_countries = array_combine($preferred_countries, $preferred_countries); $country_options = empty($preferred_countries) ? $country_list : self::rebuildCountryList($country_list, $preferred_countries); // Hide the dropdown when there is only one possible value.