diff --git a/addressfield.module b/addressfield.module index 177d92b..8d46331 100644 --- a/addressfield.module +++ b/addressfield.module @@ -207,12 +207,15 @@ function _addressfield_render_address(&$format, $address) { } } - if (isset($child['#options'])) { - // Expand options if necessary. - $child['#children'] = isset($child['#options'][$address[$key]]) ? check_plain($child['#options'][$address[$key]]) : ''; - } - else { - $child['#children'] = check_plain($address[$key]); + $child['#children'] = ''; + if (isset($address[$key])) { + if (isset($child['#options'])) { + // Expand options if necessary. + $child['#children'] = check_plain($child['#options'][$address[$key]]); + } + else { + $child['#children'] = check_plain($address[$key]); + } } // Skip empty elements.