mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
* LDAP: fix not working connect under newer PHP 5.6 (maybe other versions too) with PHP Warning: invalid port number: 0
This commit is contained in:
parent
223135c7fb
commit
ff2d675d36
@ -188,7 +188,7 @@ class ldap
|
||||
$host = parse_url($host,PHP_URL_HOST);
|
||||
}
|
||||
// connect to ldap server (never fails, as connection happens in bind!)
|
||||
if(!$this->ds = ldap_connect($host, $port))
|
||||
if(!($this->ds = !empty($port) ? ldap_connect($host, $port) : ldap_connect($host)))
|
||||
{
|
||||
return False;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user