From f6301ca7b736d58278b3d94e2cfae5bbc1b7182e Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 20 Oct 2015 17:06:27 +0200 Subject: [PATCH] crashreport, ldap_set_option(): supplied argument is not a valid ldap link resource in /usr/local/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php on line 213 --- src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php index 476186647..45fbc718a 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php +++ b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php @@ -210,9 +210,9 @@ class LDAP implements IAuthConnector { $this->closeLDAPHandle(); $this->ldapHandle = @ldap_connect($bind_url); - ldap_set_option($this->ldapHandle, LDAP_OPT_NETWORK_TIMEOUT, $timeout); if ($this->ldapHandle !== false) { + ldap_set_option($this->ldapHandle, LDAP_OPT_NETWORK_TIMEOUT, $timeout); ldap_set_option($this->ldapHandle, LDAP_OPT_REFERRALS, 0); ldap_set_option($this->ldapHandle, LDAP_OPT_DEREF, LDAP_DEREF_SEARCHING); ldap_set_option($this->ldapHandle, LDAP_OPT_PROTOCOL_VERSION, (int)$this->ldapVersion);