Code

Fixed php warning
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 11:47:18 +0000 (11:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 11:47:18 +0000 (11:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18550 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_configRegistry.inc

index cc51e3ce1ed0d64d20a07b68abc22dde1ccfb613..420c0034650a8e1d69b1261d0ea54e1555c6c3a0 100644 (file)
@@ -531,13 +531,15 @@ class gosaProperty
                 $attrs = $ldap->fetch();
                 $data = array();
                 $found = false;
-                for($i = 0;$i<$attrs['gosaSetting']['count']; $i ++){
-                    $set = $attrs['gosaSetting'][$i];
-                    if(preg_match("/^{$this->name}:/", $set)){
-                        $set = "{$this->name}:{$this->tmp_value}";
-                        $found = true;
+                if(isset($attrs['gosaSetting']['count'])){
+                    for($i = 0;$i<$attrs['gosaSetting']['count']; $i ++){
+                        $set = $attrs['gosaSetting'][$i];
+                        if(preg_match("/^{$this->name}:/", $set)){
+                            $set = "{$this->name}:{$this->tmp_value}";
+                            $found = true;
+                        }
+                        $data['gosaSetting'][] = $set;
                     }
-                    $data['gosaSetting'][] = $set;
                 }
                 if(!$found) $data['gosaSetting'][] = "{$this->name}:{$this->tmp_value}";
                 $ldap->cd($dn);