From 16c5e2deec653d8a4dbd7e3bda847424f25c41dc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 8 Sep 2015 13:07:35 +0000 Subject: [PATCH] * LDAP: fix not working connect under newer PHP 5.6 (maybe other versions too) with PHP Warning: invalid port number: 0 --- phpgwapi/inc/class.ldap.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.ldap.inc.php b/phpgwapi/inc/class.ldap.inc.php index 11cf3b11c3..010c4703b1 100644 --- a/phpgwapi/inc/class.ldap.inc.php +++ b/phpgwapi/inc/class.ldap.inc.php @@ -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; }