Fix bug in HTMLForm system where "Other" option for timezone was shown twice, reporte...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Jul 2009 14:06:22 +0000 (14:06 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Jul 2009 14:06:22 +0000 (14:06 +0000)
includes/HTMLForm.php

index fef7742..ae35756 100644 (file)
@@ -630,7 +630,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
        static $jsAdded = false;
 
        function __construct( $params ) {
-               if( !array_key_exists( 'other', $params['options'] ) ) {
+               if( !in_array( 'other', $params['options'] ) ) {
                        $params['options'][wfMsg( 'htmlform-selectorother-other' )] = 'other';
                }