fixed PHP notice

This commit is contained in:
Roland Gruber 2010-06-16 17:22:47 +00:00
parent 23ca3b9e86
commit c85e718178
2 changed files with 24 additions and 16 deletions

View File

@ -1755,16 +1755,20 @@ class inetOrgPerson extends baseModule implements passwordService {
if (isset($attributes[$attrName]) && !isset($attributesNew[$attrName])) $return['del'][$attrName] = $attributes[$attrName]; if (isset($attributes[$attrName]) && !isset($attributesNew[$attrName])) $return['del'][$attrName] = $attributes[$attrName];
elseif (!isset($attributes[$attrName]) && isset($attributesNew[$attrName])) $return['add'][$attrName] = $attributesNew[$attrName]; elseif (!isset($attributes[$attrName]) && isset($attributesNew[$attrName])) $return['add'][$attrName] = $attributesNew[$attrName];
else { else {
for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) { if (isset($attributes[$attrName])) {
if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) { for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) {
$return['mod'][$attrName] = $attributesNew[$attrName]; if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) {
break; $return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
} }
} }
for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) { if (isset($attributesNew[$attrName])) {
if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) { for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) {
$return['mod'][$attrName] = $attributesNew[$attrName]; if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) {
break; $return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
} }
} }
} }

View File

@ -1014,16 +1014,20 @@ class kolabUser extends baseModule {
$return['add'][$attrName] = $attributesNew[$attrName]; $return['add'][$attrName] = $attributesNew[$attrName];
} }
else { else {
for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) { if (isset($attributes[$attrName])) {
if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) { for ($a = 0; $a < sizeof($attributes[$attrName]); $a++) {
$return['mod'][$attrName] = $attributesNew[$attrName]; if (!in_array($attributes[$attrName][$a], $attributesNew[$attrName])) {
break; $return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
} }
} }
for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) { if (isset($attributesNew[$attrName])) {
if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) { for ($a = 0; $a < sizeof($attributesNew[$attrName]); $a++) {
$return['mod'][$attrName] = $attributesNew[$attrName]; if (!in_array($attributesNew[$attrName][$a], $attributes[$attrName])) {
break; $return['mod'][$attrName] = $attributesNew[$attrName];
break;
}
} }
} }
} }