Code

Updated ldap class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 13 Jan 2006 10:22:43 +0000 (10:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 13 Jan 2006 10:22:43 +0000 (10:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2475 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc

index c22730ab1c831e4bdec6e6301d5777e693616ece..255f0ddfd5dee35b606ca34bbb19668404630b97 100644 (file)
@@ -405,7 +405,12 @@ class LDAP{
                   $attr[$key] = $attr[$key][0];
                 }
               }
-              if(isset($attr[$key]['count'])) unset($attr[$key]['count']);
+              
+              if(isset($attr[$key]['count'])){
+                if(is_array($attr[$key])){
+                  unset($attr[$key]['count']);
+                }
+              }
             }
             unset($attr['count']);
             unset($attr['dn']);
@@ -426,7 +431,11 @@ class LDAP{
                 $attr[$key] = $attr[$key][0];
               }
             }
-            if(isset($attr[$key]['count'])) unset($attr[$key]['count']); 
+            if(isset($attr[$key]['count'])){
+              if(is_array($attr[$key])){
+                unset($attr[$key]['count']);
+              }
+            }
           }
           unset($attr['count']);
           unset($attr['dn']);