Code

Updated workstation - installation log view plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Feb 2009 16:48:16 +0000 (16:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Feb 2009 16:48:16 +0000 (16:48 +0000)
-Fixed  PHP error "Invalid argument supplied for foreach()"

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13381 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_gosaSupportDaemon.inc

index 2f619e84ed0647dfc27a8ecd5e2fdef544dddd95..3cf6e7da5c42712045ee2d28c0f1d3a3dfd7ecaa 100644 (file)
@@ -1758,6 +1758,9 @@ class gosaSupportDaemon
 
           /* Get list of available log files 
            */
+          if(!is_array($entry)){
+            $entry = array($entry);
+          }
           foreach($entry as $log_date){
             $xml_msg2 = "<xml> 
               <header>gosa_show_log_files_by_date_and_mac</header> 
@@ -1766,7 +1769,7 @@ class gosaSupportDaemon
               <date>".$log_date."</date> 
               <mac>".$mac."</mac> 
               </xml>";
-
+   
             $ret[$mac][$log_date] = array();
             $res = $this->_send($xml_msg2,TRUE);
             $ret[$mac][$log_date]['DATE_STR']  = $log_date;