LSldap : combineFilters() : fix parameter support when array contain only one filter

This commit is contained in:
Benjamin Renard 2014-11-28 16:16:30 +01:00
parent 9aa48000e5
commit 1518888efa

View file

@ -452,8 +452,13 @@ class LSldap {
public static function combineFilters($op,$filters,$asStr=false) {
if (is_array($filters) && !empty($filters)) {
if (count($filters)==1) {
if ($asStr && $filters[0] instanceof Net_LDAP2_Filter) {
return $filters[0]->asString();
}
else {
return $filters[0];
}
}
$filter=Net_LDAP2_Filter::combine($op,$filters);
if (!Net_LDAP2::isError($filter)) {
if ($asStr) {