X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLSelectAndOtherField.php;h=65176dd7ac4b525f289d3ae3bc465c1ecc172b51;hb=dd107dda969ac77b86a89b0e98fcf85352c6035d;hp=19b2f7c56f711e16ab533f6a5e1c465a08f48c0e;hpb=2e040b99eda6c99cf472b3896f62d2f21315e808;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLSelectAndOtherField.php b/includes/htmlform/HTMLSelectAndOtherField.php index 19b2f7c56f..65176dd7ac 100644 --- a/includes/htmlform/HTMLSelectAndOtherField.php +++ b/includes/htmlform/HTMLSelectAndOtherField.php @@ -26,7 +26,8 @@ class HTMLSelectAndOtherField extends HTMLSelectField { throw new MWException( 'HTMLSelectAndOtherField called without any options' ); } if ( !in_array( 'other', $this->mOptions, true ) ) { - $this->mOptions[$params['other']] = 'other'; + // Have 'other' always as first element + $this->mOptions = array( $params['other'] => 'other' ) + $this->mOptions; } $this->mFlatOptions = self::flattenOptions( $this->getOptions() );