Code

Fixed undefined index in printer selection dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 06:33:13 +0000 (06:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Sep 2005 06:33:13 +0000 (06:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1296 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printerPPDSelectionDialog.inc

index b10357b9d056ca6fc703002375cfde08642b1a76..9bc12f29f1954c55c41c23358fe1d561490db94e 100644 (file)
@@ -30,8 +30,10 @@ class printerPPDSelectionDialog extends plugin
      */
     if(isset($ppd)){
       $tmp2 = split("\n",$ppd['ppd']);
-      $this->currentPos = $tmp2[0];
-      $this->currentSel = preg_replace("/^ -/","",$tmp2[1]);
+      if(count($tmp2)==2){
+        $this->currentPos = $tmp2[0];
+        $this->currentSel = preg_replace("/^ -/","",$tmp2[1]);
+      }
     }
   
     /* Order the manufacturers index */