From 6d44013d92e9aabcfa1fca6fee0ee8d9888a8d9a Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <machniak@kolabsys.com>
Date: Sat, 21 Jan 2023 12:19:47 +0100
Subject: [PATCH] Fix duplicated port number in debug message

---
 lib/Net/LDAP3.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 9182347..eccd8e5 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -609,7 +609,7 @@ class Net_LDAP3
         $port  = $this->config_get('port', 389);
 
         foreach ((array) $hosts as $host) {
-            $this->_debug("C: Connect [$host:$port]");
+            $this->_debug("C: Connect [" . $host . (strpos($host, ':') ? '' : ":$port") . "]");
 
             if ($lc = @ldap_connect($host, $port)) {
                 if ($this->config_get('use_tls', false) === true) {
-- 
GitLab