From 21e6aaff36d99411fd9b1967a510ef9342e2dc5f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 14 Sep 2005 09:20:04 +0000 Subject: [PATCH] Added check for undefined index ... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1361 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/ogroups/class_phonequeue.inc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc index ae7fca4f0..1e81e0978 100644 --- a/plugins/admin/ogroups/class_phonequeue.inc +++ b/plugins/admin/ogroups/class_phonequeue.inc @@ -286,11 +286,13 @@ class phonequeue extends plugin $i = 0; $queueuser =array(); foreach($this->parent->by_object['ogroup']->memberList as $member){ - if(in_array("goFonAccount",$member['objectClass'])){ - $i ++ ; - $queueuser[$i]['queue_name'] = $this->attrs['cn'][0]; - $queueuser[$i]['interface'] = "SIP/".$member['uid'][0]; - $queueuser[$i]['penalty'] = 1; + if(isset($member['objectClass'])){ + if(in_array("goFonAccount",$member['objectClass'])){ + $i ++ ; + $queueuser[$i]['queue_name'] = $this->attrs['cn'][0]; + $queueuser[$i]['interface'] = "SIP/".$member['uid'][0]; + $queueuser[$i]['penalty'] = 1; + } } } @@ -314,8 +316,10 @@ class phonequeue extends plugin $queueusers=0; foreach($this->parent->by_object['ogroup']->memberList as $member){ - if(in_array("goFonAccount",$member['objectClass'])){ - $queueusers++; + if(isset($member['objectClass'])){ + if(in_array("goFonAccount",$member['objectClass'])){ + $queueusers++; + } } } -- 2.30.2