From 81ef2eaacf7fcd166252e1956f0d0e8a8803edd1 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 22 Apr 2011 14:24:28 +0200 Subject: [PATCH] LSldap :: update() : Fixed bug when dropping empty attribute --- public_html/includes/class/class.LSldap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public_html/includes/class/class.LSldap.php b/public_html/includes/class/class.LSldap.php index 52befc30..b66d817f 100644 --- a/public_html/includes/class/class.LSldap.php +++ b/public_html/includes/class/class.LSldap.php @@ -318,7 +318,8 @@ class LSldap { else { if (!empty($dropAttr)) { foreach($dropAttr as $attr) { - if(Net_LDAP2::isError($entry -> getValue($attr))) { + $value = $entry -> getValue($attr); + if(Net_LDAP2::isError($value) || empty($value)) { // Attribut n'existe pas dans l'annuaire continue; }