Glaisher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249787

Change subject: Unbreak OOUI HTMLRadioField's "value" attribute
......................................................................

Unbreak OOUI HTMLRadioField's "value" attribute

$value is used below as well for another purpose so the actual value
submitted by the user changes due to the $value used in foreach.

Change-Id: I4826d944552dc90868fbb658ad91343feecdd682
---
M includes/htmlform/HTMLRadioField.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/249787/1

diff --git a/includes/htmlform/HTMLRadioField.php 
b/includes/htmlform/HTMLRadioField.php
index 19b45be..8cdd746 100644
--- a/includes/htmlform/HTMLRadioField.php
+++ b/includes/htmlform/HTMLRadioField.php
@@ -40,9 +40,9 @@
 
        function getInputOOUI( $value ) {
                $options = array();
-               foreach ( $this->getOptions() as $label => $value ) {
+               foreach ( $this->getOptions() as $label => $optValue ) {
                        $options[] = array(
-                               'data' => $value,
+                               'data' => $optValue,
                                'label' => $this->mOptionsLabelsNotFromMessage 
? new OOUI\HtmlSnippet( $label ) : $label,
                        );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/249787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4826d944552dc90868fbb658ad91343feecdd682
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to