Force select-or-other type fields to string values, fixing problem where stub thresho...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 15 Jul 2009 16:36:04 +0000 (16:36 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 15 Jul 2009 16:36:04 +0000 (16:36 +0000)
includes/HTMLForm.php

index ae35756..9d3c38e 100644 (file)
@@ -647,7 +647,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
                $selected = $valInSelect ? $value : 'other';
 
                $select = new XmlSelect( $this->mName, $this->mID, $selected );
-               $select->addOptions( $this->mParams['options'] );
+               $select->addOptions( array_map( 'strval', $this->mParams['options'] ) );
 
                $select->setAttribute( 'class', 'mw-htmlform-select-or-other' );