ldap_set_option should be called with a valid link identifier

This commit is contained in:
Pierre du Plessis 2015-11-03 16:09:23 +02:00
parent 2c1bb06e54
commit 7f891969c5

View File

@ -109,11 +109,11 @@ class LdapClient implements LdapClientInterface
$host = 'ldaps://'.$host;
}
$this->connection = ldap_connect($host, $this->port);
ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->version);
ldap_set_option($this->connection, LDAP_OPT_REFERRALS, $this->optReferrals);
$this->connection = ldap_connect($host, $this->port);
if ($this->useStartTls) {
ldap_start_tls($this->connection);
}