LSldap :: update() : Fixed bug when dropping empty attribute
authorBenjamin Renard <brenard@easter-eggs.com>
Fri, 22 Apr 2011 12:24:28 +0000 (14:24 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Fri, 22 Apr 2011 12:24:28 +0000 (14:24 +0200)
public_html/includes/class/class.LSldap.php

index 52befc3..b66d817 100644 (file)
@@ -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;
             }