diff --git a/api/src/Ldap.php b/api/src/Ldap.php index abd2f157db..f6c1badf10 100644 --- a/api/src/Ldap.php +++ b/api/src/Ldap.php @@ -227,7 +227,7 @@ class Ldap $host = parse_url($host,PHP_URL_HOST); } // connect to ldap server (never fails, as connection happens in bind!) - if(!($this->ds = !empty($port) ? ldap_connect($host, $port) : ldap_connect($host))) + if(!$host || !($this->ds = !empty($port) ? ldap_connect($host, $port) : ldap_connect($host))) { return False; }