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);