mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSldap : combineFilters() : fix parameter support when array contain only one filter
This commit is contained in:
parent
9aa48000e5
commit
1518888efa
1 changed files with 6 additions and 1 deletions
|
@ -452,7 +452,12 @@ class LSldap {
|
|||
public static function combineFilters($op,$filters,$asStr=false) {
|
||||
if (is_array($filters) && !empty($filters)) {
|
||||
if (count($filters)==1) {
|
||||
return $filters[0];
|
||||
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)) {
|
||||
|
|
Loading…
Reference in a new issue