Code

Fixed undefined idex error, if printer has no description
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Sep 2005 14:04:20 +0000 (14:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Sep 2005 14:04:20 +0000 (14:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1290 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_selectPrinterDialog.inc

index 7910d24077c6d66f5bd2187e0ec61cdfb29db650..76558dceab8ab370a358b414bf8e6eb2e8804ca7 100644 (file)
@@ -85,7 +85,11 @@ class selectPrinterDialog extends plugin
       if($detailed ==true){
         $a_return[$printer['cn'][0]] = $printer;
       }else{
-        $a_return[$printer['cn'][0]] = $printer['cn'][0]." - ".$printer['description'][0]; 
+        if(isset($printer['description'][0])){
+          $a_return[$printer['cn'][0]] = $printer['cn'][0]." - ".$printer['description'][0];  
+        }else{
+          $a_return[$printer['cn'][0]] = $printer['cn'][0];  
+        }
       }
     }
     return($a_return);