fix some scrutinizer "bugs"

This commit is contained in:
Ralf Becker 2016-06-26 19:15:19 +02:00
parent 903b14f45d
commit 8a9b6591a8

View File

@ -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;
}