diff --git a/src/messenger/webim/operator/group.php b/src/messenger/webim/operator/group.php index b4a5af1d..ff8e9ab5 100644 --- a/src/messenger/webim/operator/group.php +++ b/src/messenger/webim/operator/group.php @@ -100,9 +100,12 @@ if (isset($_POST['name'])) { if ($email != '' && !is_valid_email($email)) $errors[] = wrong_field("form.field.mail"); - if (! preg_match("/^\d{1,9}$/", $weight)) + if (! preg_match("/^(\d{1,9})?$/", $weight)) $errors[] = wrong_field("form.field.groupweight"); + if ($weight == '') + $weight = 0; + if (! $parentgroup) $parentgroup = NULL;