HTMLRadioField: Use another variable for the radio value to avoid conflicts
authorFlorianschmidtwelzow <florian.schmidt.welzow@t-online.de>
Wed, 28 Oct 2015 14:39:39 +0000 (15:39 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 28 Oct 2015 18:55:07 +0000 (18:55 +0000)
commit46ab7a82908933454c43259cf7e1fae1f316e51f
tree97b74a0a145288f96811541e3fa622ed1d87c58b
parent33859dfcf5c3eae9dda11d9a7d5d505ee6b32b64
HTMLRadioField: Use another variable for the radio value to avoid conflicts

$value is used in a foreach loop to build the radioselect fields array for OOUI,
but $value is also the variable, which holds the default value for the element
(or a value, which ws submitted by the user), to pre-select the correct radio input
field. That results in the problem, that $value will always contain the last data,
which passed the foreach loop, and always the last radio input field will be pre-
selected, no matter, what the developer defined as the default or what the user
submitted in a prior form instance.

Change the variable used in the foreach loop to avoid this conflict.

Change-Id: I36c760be8ccd86e75249c966f697b499576c83d4
includes/htmlform/HTMLRadioField.php