From 4bee5e848f3aa15c667d01df05aa1a92ff07d2ec Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 20 Mar 2005 10:05:59 +0000 Subject: [PATCH] check if object is returned. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9079 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/abook_ldap_server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/abook_ldap_server.php b/functions/abook_ldap_server.php index 3e115177..cfb36000 100644 --- a/functions/abook_ldap_server.php +++ b/functions/abook_ldap_server.php @@ -161,7 +161,7 @@ class abook_ldap_server extends addressbook_backend { $this->linkid = @ldap_connect($this->server, $this->port); if(!$this->linkid) { - if(function_exists('ldap_error')) { + if(function_exists('ldap_error') && is_object($this->linkid)) { return $this->set_error(ldap_error($this->linkid)); } else { return $this->set_error('ldap_connect failed'); -- 2.25.1