From 5d4d7c99d661cd3b83ab3d1ecf26ff15e5c85ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 19 Nov 2020 22:07:32 +0100 Subject: [PATCH] Update ldap.class.php The variable $result seems to be never defined. --- htdocs/core/class/ldap.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 9011d9b54f7..1bd25e123a3 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -984,14 +984,12 @@ class Ldap // Define filter if (!empty($activefilter)) { - if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) - { + if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) { $filter = '('.$this->filter.')'; - } elseif (((string) $activefilter == 'member') && $this->filter) - { + } elseif (((string) $activefilter == 'member') && $this->filter) { $filter = '('.$this->filtermember.')'; - } else // If this->filter is empty, make fiter on * (all) - { + } else { + // If this->filter is empty, make fiter on * (all) $filter = '('.$useridentifier.'=*)'; } } else { @@ -1070,6 +1068,7 @@ class Ldap */ public function littleEndian($hex) { + $result = ''; for ($x = dol_strlen($hex) - 2; $x >= 0; $x = $x - 2) { $result .= substr($hex, $x, 2); }