From 7f891969c57a3714bc5f532d7f78128ec21968d6 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Tue, 3 Nov 2015 16:09:23 +0200 Subject: [PATCH] ldap_set_option should be called with a valid link identifier --- src/Symfony/Component/Ldap/LdapClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Ldap/LdapClient.php b/src/Symfony/Component/Ldap/LdapClient.php index 734ff4e906c2..ebb263d5cf0c 100644 --- a/src/Symfony/Component/Ldap/LdapClient.php +++ b/src/Symfony/Component/Ldap/LdapClient.php @@ -109,11 +109,11 @@ private function connect() $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); }