Skip to content

Commit

Permalink
selected array should be reinitialized on each iteration of i to avoi…
Browse files Browse the repository at this point in the history
…d more than one "selected" operator in the dropdown.

As posted by Octavio Alvarez.
  • Loading branch information
arr2036 committed Jan 21, 2013
1 parent a9ece90 commit 3825dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/user_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
if ($name == 'none')
continue;
unset($vals);
unset($selected);
unset($ops);
$def_added = 0;
if ($item_vals["$key"][count]){
Expand Down Expand Up @@ -179,6 +178,7 @@

$i = 0;
foreach($vals as $val){
unset($selected);
$name1 = $name . $i;
$val = preg_replace('/"/','"',$val);
$oper_name = $name1 . '_op';
Expand Down

0 comments on commit 3825dc8

Please sign in to comment.