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

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

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

Loading…
Cancel
Save