Skip to content

Commit 8c4e756

Browse files
committed
bug symfony#16442 [LDAP] ldap_set_option should be called with a valid link identifier (pierredup)
This PR was merged into the 2.8 branch. Discussion ---------- [LDAP] ldap_set_option should be called with a valid link identifier | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 7f89196 ldap_set_option should be called with a valid link identifier
2 parents bf849ef + 7f89196 commit 8c4e756

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Ldap/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)