LSldap :: update() : Fixed notice PHP
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 16 Nov 2010 18:49:35 +0000 (19:49 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 16 Nov 2010 18:49:35 +0000 (19:49 +0100)
public_html/includes/class/class.LSldap.php

index baa7d7c..52befc3 100644 (file)
@@ -293,9 +293,14 @@ class LSldap {
           $dropAttr[] = $attrName;
         }
       }
-      $entry -> replace($changeData);
-      LSdebug('change : <pre>'.print_r($changeData,true).'</pre>');
-      LSdebug('drop : <pre>'.print_r($dropAttr,true).'</pre>');
+      if (isset($changeData)) {
+        $entry -> replace($changeData);
+        LSdebug('change : <pre>'.print_r($changeData,true).'</pre>');
+        LSdebug('drop : <pre>'.print_r($dropAttr,true).'</pre>');
+      }
+      else {
+        LSdebug('No change');
+      }
 
       if ($new) {
         LSdebug('LSldap :: add()');