Avoid useless connection attempts if host is empty

pull/172/head
Thomas Bruederli 11 years ago
parent 519ce2e2ec
commit 3980579602

@ -160,7 +160,7 @@ class rcube_ldap_generic
$this->config['hosts'] = array($this->config['hosts']); $this->config['hosts'] = array($this->config['hosts']);
foreach ($this->config['hosts'] as $host) { foreach ($this->config['hosts'] as $host) {
if ($this->connect($host)) { if (!empty($host) && $this->connect($host)) {
return true; return true;
} }
} }

Loading…
Cancel
Save