Code

Fixed undefined index when trying to get printer list
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Jul 2006 08:40:58 +0000 (08:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Jul 2006 08:40:58 +0000 (08:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4014 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc

index 36c0ddf9e43357e690970849b89d84c1e0453e18..46a0e53e9ddd51036441153a199723d2d01d374f 100644 (file)
@@ -1194,7 +1194,7 @@ function get_printer_list($cups_server)
     $ar = false;
     exec("lpstat -p", $ar);
     foreach($ar as $val){
-      list($dummy, $printer, $rest)= split(' ', $val, 3);
+      @list($dummy, $printer, $rest)= split(' ', $val, 3);
       if (preg_match('/^[^@]+$/', $printer)){
         $res[$printer]= "$printer";
       }