This commit is contained in:
Jephté Clain 2024-05-16 12:34:48 +04:00
parent 37ac992222
commit 64e18fdcc2
1 changed files with 2 additions and 2 deletions

View File

@ -161,12 +161,12 @@ class LdapSearch extends Parametrable implements IteratorAggregate {
if ($rr === false) return; // pas trouvé
try {
$er = LdapException::check("first_entry", $conn, ldap_first_entry($conn, $rr), 32);
$er = ldap_first_entry($conn, $rr);
while ($er !== false) {
$dn = ldap_get_dn($conn, $er);
$entry = ldap_get_attributes($conn, $er);
yield $dn => $entry;
$er = LdapException::check("next_entry", $conn, ldap_next_entry($conn, $er), 32);
$er = ldap_next_entry($conn, $er);
}
} catch (StopException $e) {
} finally {