From: Andrew Garrett Date: Wed, 15 Jul 2009 16:36:04 +0000 (+0000) Subject: Force select-or-other type fields to string values, fixing problem where stub thresho... X-Git-Tag: 1.31.0-rc.0~40920 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=e8f73d6e9cbff542b821ddf9066a195763755a44;p=lhc%2Fweb%2Fwiklou.git Force select-or-other type fields to string values, fixing problem where stub threshold was not being properly loaded into preferences window once saved differently to the default --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index ae35756bac..9d3c38e986 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -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' );