From eb7886ecff7ed8ca0bb09a89ed79d7fc1c7f048c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Mar 2018 12:37:53 +0100 Subject: [PATCH] Update ldap.class.php --- htdocs/core/class/ldap.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 29c8adb0aaa..3d92d5f9019 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -739,8 +739,7 @@ class Ldap function serverPing($host, $port=389, $timeout=1) { // Replace ldaps:// by ssl:// - if (preg_match('/^ldaps/',$host)) { - preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs); + if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/',$host, $regs)) { $host = 'ssl://'.$regs[1]; } $op = @fsockopen($host, $port, $errno, $errstr, $timeout);