[Form] Fixed incorrect sorting in ChoiceList::getChoicesForValues

This commit is contained in:
grizlik 2012-02-03 14:21:24 +04:00
parent 2cd246786d
commit a60daffb47

View File

@ -200,8 +200,8 @@ class ChoiceList implements ChoiceListInterface
$choices = array(); $choices = array();
foreach ($this->values as $i => $value) { foreach ($values as $j => $givenValue) {
foreach ($values as $j => $givenValue) { foreach ($this->values as $i => $value) {
if ($value === $givenValue) { if ($value === $givenValue) {
$choices[] = $this->choices[$i]; $choices[] = $this->choices[$i];
unset($values[$j]); unset($values[$j]);