Skip to content

Commit 2ffbdae

Browse files
committed
ldap_set_option should be called with a valid link identifier
1 parent 8002801 commit 2ffbdae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LdapClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ private function connect()
109109
$host = 'ldaps://'.$host;
110110
}
111111

112+
$this->connection = ldap_connect($host, $this->port);
113+
112114
ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->version);
113115
ldap_set_option($this->connection, LDAP_OPT_REFERRALS, $this->optReferrals);
114116

115-
$this->connection = ldap_connect($host, $this->port);
116-
117117
if ($this->useStartTls) {
118118
ldap_start_tls($this->connection);
119119
}

0 commit comments

Comments
 (0)