Merge pull request #19726 from vdegrandpre/FIX-19725-LDAP-AUTH-500

FIX - 19725 - Authentification LDAP échoue avec erreur 500
This commit is contained in:
Laurent Destailleur 2022-01-06 16:03:35 +01:00 committed by GitHub
commit aba6aed7d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,8 @@ class Ldap
*/
public function close()
{
if ($this->connection && !@ldap_close($this->connection)) {
$r_type = get_resource_type($this->connection);
if ($this->connection && ($r_type === "Unknown" || !@ldap_close($this->connection))) {
return false;
} else {
return true;