fixed problem in profile editor if no group name was set

This commit is contained in:
Roland Gruber 2011-12-22 19:48:34 +00:00
parent 792cc00a1d
commit bf20b6e895
1 changed files with 7 additions and 5 deletions

View File

@ -643,11 +643,13 @@ class freeRadius extends baseModule {
$messages = parent::check_profileOptions($options);
// group names
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
$list = preg_split('/;[ ]*/', $options['freeRadius_radiusGroupName'][0]);
for ($i = 0; $i < sizeof($list); $i++) {
if (!get_preg($list[$i], 'groupname')) {
$messages[] = $this->messages['radiusGroupName'][0];
break;
if (isset($options['freeRadius_radiusGroupName'][0]) && ($options['freeRadius_radiusGroupName'][0] != '')) {
$list = preg_split('/;[ ]*/', $options['freeRadius_radiusGroupName'][0]);
for ($i = 0; $i < sizeof($list); $i++) {
if (!get_preg($list[$i], 'groupname')) {
$messages[] = $this->messages['radiusGroupName'][0];
break;
}
}
}
}