Fix "PHP Fatal error: Cannot break/continue 1 level" when ldap_start_tls() fails

pull/198/head
Aleksander Machniak 10 years ago
parent 51cae1f5ec
commit f67d372449

@ -175,9 +175,11 @@ class rcube_ldap_generic
$this->_debug("C: Connect to $hostname [{$this->config['name']}]");
if ($lc = @ldap_connect($host, $this->config['port'])) {
if ($this->config['use_tls'] === true)
if (!ldap_start_tls($lc))
continue;
if ($this->config['use_tls'] === true) {
if (!ldap_start_tls($lc)) {
return false;
}
}
$this->_debug("S: OK");

Loading…
Cancel
Save