fixed bug with PHP > 4.4

This commit is contained in:
Roland Gruber 2005-07-16 10:22:36 +00:00
parent 4890ef5dd8
commit 3ce7b5a6f9
1 changed files with 4 additions and 3 deletions

View File

@ -158,11 +158,12 @@ switch ($_POST['select']) {
do { // X-Or, only one if() can be true
if (isset($_POST['allgroups']) && isset($_POST['add'])) { // Add groups to list
// Add new group
$account_new->general_groupadd = @array_merge($account_new->general_groupadd, $_POST['allgroups']);
if (!is_array($account_new->general_groupadd)) $account_new->general_groupadd = array();
$account_new->general_groupadd = array_merge($account_new->general_groupadd, $_POST['allgroups']);
// remove doubles
$account_new->general_groupadd = @array_flip($account_new->general_groupadd);
$account_new->general_groupadd = array_flip($account_new->general_groupadd);
array_unique($account_new->general_groupadd);
$account_new->general_groupadd = @array_flip($account_new->general_groupadd);
$account_new->general_groupadd = array_flip($account_new->general_groupadd);
// sort groups
sort($account_new->general_groupadd);
break;