From 7e5166665caa1d1debb8a924584a9ad30f3daeed Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 1 Jul 2009 17:59:19 +0000 Subject: [PATCH] Output final optgroup. Props hakre. fixes #10292 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@11677 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 96204d8cf..3984a3164 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3222,7 +3222,7 @@ function _wp_timezone_choice_usort_callback( $a, $b ) { /** * Gives a nicely formatted list of timezone strings // temporary! Not in final * - * @param string $selectedzone - which zone should be the selected one + * @param $selected_zone string Selected Zone * */ function wp_timezone_choice( $selected_zone ) { @@ -3320,7 +3320,7 @@ function wp_timezone_choice( $selected_zone ) { $structure[] = '"; // Close continent optgroup - if ( !empty( $zone['city'] ) && isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent'] ) { + if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) { $structure[] = ''; } }