summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/user_ldap/lib/connection.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 57dc060f38e..67918bca409 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -570,6 +570,7 @@ class Connection extends LDAPUtility {
* @param string $host
* @param string $port
* @return false|void
+ * @throws \OC\ServerNotAvailableException
*/
private function doConnect($host, $port) {
if(empty($host)) {
@@ -582,6 +583,8 @@ class Connection extends LDAPUtility {
$this->ldap->startTls($this->ldapConnectionRes);
}
}
+ } else {
+ throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.');
}
}