From: hickert Date: Wed, 2 Aug 2006 03:23:40 +0000 (+0000) Subject: Fixed problem with unknown printer member X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0dd2e6674eed0505946938c217b9e59bfbb45f9c;p=gosa.git Fixed problem with unknown printer member git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4361 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 592a1a1b5..ea4f24dc9 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -132,12 +132,14 @@ class printgeneric extends plugin foreach($this->attrs[$attr] as $mem){ if(preg_match("/Group/",$type)){ $ldap->search("(&(objectClass=posixGroup)(cn=".$mem."))",array("cn","description")); - $entry = $ldap->fetch(); - $this->member[$type][$entry['cn'][0]]=$entry; + if($ldap->count()){ + $entry = $ldap->fetch(); + $this->member[$type][$entry['cn'][0]]=$entry; + } }else{ $ldap->search("(&(objectClass=person)(objectClass=inetOrgPerson)(uid=".$mem."))",array("cn","uid")); - $entry = $ldap->fetch(); - if(isset($entry['uid'])){ + if($ldap->count()){ + $entry = $ldap->fetch(); $this->member[$type][$entry['uid'][0]]=$entry; } }