From d0facbe7242537a6afc74bfdd7b84b757c7e42c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Apr 2007 07:28:23 +0000 Subject: [PATCH] Fixed undefined index warning git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6179 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_userinfo.inc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 8268e57b5..b409af88b 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -107,14 +107,17 @@ class userinfo $ldap->cat($aclc_value['acl'],array("gosaAclTemplate")); $attrs = $ldap->fetch(); - for($i= 0; $i<$attrs['gosaAclTemplate']['count']; $i++){ - $tmp = @acl::explodeAcl($attrs['gosaAclTemplate'][$i]); - foreach($tmp as $new_acl){ - $new_acl['members'] = $aclc_value['members']; - $aclc[$dn][] =$new_acl; - } - } + if(isset($attrs['gosaAclTemplate'])){ + for($i= 0; $i<$attrs['gosaAclTemplate']['count']; $i++){ + $tmp = @acl::explodeAcl($attrs['gosaAclTemplate'][$i]); + + foreach($tmp as $new_acl){ + $new_acl['members'] = $aclc_value['members']; + $aclc[$dn][] =$new_acl; + } + } + } } } } -- 2.30.2