Skip to content
Snippets Groups Projects
Commit 1552e7f4 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #5286 from atm-ph/fix_3.7_call_function_not_exists

Fix call function ldap_connect but not exists
parents 0735413e 8ccda16e
No related branches found
No related tags found
No related merge requests found
...@@ -159,6 +159,15 @@ class Ldap ...@@ -159,6 +159,15 @@ class Ldap
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
} }
if (! function_exists("ldap_connect"))
{
$this->error='LDAPFunctionsNotAvailableOnPHP';
$return=-1;
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
}
if (empty($this->error))
{
// Loop on each ldap server // Loop on each ldap server
foreach ($this->server as $key => $host) foreach ($this->server as $key => $host)
{ {
...@@ -236,6 +245,7 @@ class Ldap ...@@ -236,6 +245,7 @@ class Ldap
if (! $connected) $this->close(); if (! $connected) $this->close();
} }
}
if ($connected) if ($connected)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment