LdapConnnection: Don't pass param `$serverCtrls` to `ldap_search` prior php 7.3

refs #4013
This commit is contained in:
Johannes Meyer 2020-01-13 13:17:40 +01:00
parent 16a7cb77ac
commit 7bb9c8e25f
1 changed files with 23 additions and 13 deletions

View File

@ -1294,7 +1294,6 @@ class LdapConnection implements Selectable, Inspectable
throw new LogicException('LDAP scope %s not supported by ldapSearch', $scope);
}
$serverctrls = [];
if ($pageSize !== null) {
$serverctrls[] = [
'oid' => LDAP_CONTROL_PAGEDRESULTS,
@ -1306,19 +1305,30 @@ class LdapConnection implements Selectable, Inspectable
'cookie' => ''
]
];
}
return @$function(
$this->getConnection(),
$baseDn,
$queryString,
$attributes,
$attrsonly,
$sizelimit,
$timelimit,
$deref,
$serverctrls
);
return @$function(
$this->getConnection(),
$baseDn,
$queryString,
$attributes,
$attrsonly,
$sizelimit,
$timelimit,
$deref,
$serverctrls
);
} else {
return @$function(
$this->getConnection(),
$baseDn,
$queryString,
$attributes,
$attrsonly,
$sizelimit,
$timelimit,
$deref
);
}
}
/**