From e056dcd3c21480226ae0c0fea60b0f052b429cd8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 7 Jun 2021 10:36:50 +0200 Subject: [PATCH] LDAPLib hotfix: in case that is not possible to connect to an LDAP server it is not possible to display a valid error message --- application/libraries/LDAPLib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/libraries/LDAPLib.php b/application/libraries/LDAPLib.php index a119af51e..195dddc88 100644 --- a/application/libraries/LDAPLib.php +++ b/application/libraries/LDAPLib.php @@ -220,7 +220,9 @@ class LDAPLib } else // Connection error { - return error(ldap_error($ldapConnection)); + return error( + 'An error occurred while connecting to the LDAP server: '.$ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT] + ); } } }