LSldapObject : fix foreach error in getObjectKeyValueInRelation() if attribute is empty

This commit is contained in:
Benjamin Renard 2017-08-18 11:59:12 +02:00
parent 7970489489
commit bf5fcf3244

View file

@ -1327,8 +1327,11 @@ class LSldapObject {
$keyValues[] = $dn;
}
else {
foreach ($object -> getValue($attrValue) as $keyValue)
if (!in_array($keyValue,$keyValues)) $keyValues[]=$keyValue;
$values=$object -> getValue($attrValue);
if (is_array($values))
foreach ($values as $keyValue)
if (!in_array($keyValue,$keyValues))
$keyValues[]=$keyValue;
}
}
return $keyValues;