From 83c90fc60c42d23dd5188c09b76d3e7541b22f3a Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Tue, 12 Aug 2025 09:59:58 -0400 Subject: [PATCH] Reset secure flag on LDAP close --- src/Ldap.php | 2 ++ src/Testing/LdapFake.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Ldap.php b/src/Ldap.php index 31cce6d1..1002565e 100644 --- a/src/Ldap.php +++ b/src/Ldap.php @@ -183,6 +183,8 @@ public function close(): bool } $this->bound = false; + $this->secure = false; + $this->host = null; $this->protocol = null; $this->connection = null; diff --git a/src/Testing/LdapFake.php b/src/Testing/LdapFake.php index 0478e0cb..39a002c2 100644 --- a/src/Testing/LdapFake.php +++ b/src/Testing/LdapFake.php @@ -353,6 +353,8 @@ public function connect(string|array $hosts = [], int $port = 389, ?string $prot public function close(): bool { $this->bound = false; + $this->secure = false; + $this->host = null; $this->protocol = null; $this->connection = null;