From 96c0762391b7ba9e4bcf1ef5fddc1c460ef02a51 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 May 2010 11:47:18 +0000 Subject: [PATCH] Fixed php warning git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18550 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index cc51e3ce1..420c00346 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -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); -- 2.30.2