From: Arran Cudbard-Bell Date: Mon, 21 Jan 2013 11:29:22 +0000 (+0000) Subject: selected array should be reinitialized on each X-Git-Tag: release_2_2_1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed29d42831f8be08928e54640a53ad5a58c2d9ef;p=thirdparty%2Ffreeradius-server.git selected array should be reinitialized on each iteration of i to avoid more than one "selected" operator in the dropdown. As posted by Octavio Alvarez. --- diff --git a/dialup_admin/htdocs/user_edit.php b/dialup_admin/htdocs/user_edit.php index 0f8e9d77754..0dc4083ab20 100644 --- a/dialup_admin/htdocs/user_edit.php +++ b/dialup_admin/htdocs/user_edit.php @@ -144,7 +144,6 @@ EOM; if ($name == 'none') continue; unset($vals); - unset($selected); unset($ops); $def_added = 0; if ($item_vals["$key"][count]){ @@ -179,6 +178,7 @@ EOM; $i = 0; foreach($vals as $val){ + unset($selected); $name1 = $name . $i; $val = preg_replace('/"/','"',$val); $oper_name = $name1 . '_op';