From 0dd2e6674eed0505946938c217b9e59bfbb45f9c Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 2 Aug 2006 03:23:40 +0000 Subject: [PATCH] Fixed problem with unknown printer member git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4361 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } } -- 2.30.2