Code

Fixed undefined index
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Aug 2006 06:19:31 +0000 (06:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Aug 2006 06:19:31 +0000 (06:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4433 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_opengw.inc

index 44cc74d6768d9a9d3423419967bc5bfd5d52bffe..de50ef93690e6d277524bdc528515372df4d8132 100755 (executable)
@@ -222,10 +222,12 @@ class ogw{
     foreach($this->validTeams as $id){
       $tmp[]= $id['company_id'];
     }
-    foreach($this->info['TeamIDis'] as $id){
-      if(!in_array($id,$tmp)){
-        $this->LastError = sprintf("Given 'Team ID':%s is invalid.",$id);
-       return(false);
+    if(is_array($this->info['TeamIDis'])){
+      foreach($this->info['TeamIDis'] as $id){
+        if(!in_array($id,$tmp)){
+          $this->LastError = sprintf("Given 'Team ID':%s is invalid.",$id);
+          return(false);
+        }
       }
     }
     return(true);