Code

Updated PPD parsing.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 07:33:43 +0000 (07:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 07:33:43 +0000 (07:33 +0000)
-Hide warnings hat may occure due to ipload of non ppd files.

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

gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc

index db3d54a25f1cd347b013f1777b92c3067caa5e36..2f176e75a93eed251cc7bce270434166127c9ae2 100644 (file)
@@ -280,9 +280,9 @@ class printerPPDDialog extends plugin
     $res  = @$this->ppdManager->loadDescription($_PathOnHdd);
     if($res){
       $tmp = split("\n",$res);
-      $name   = trim(preg_replace("/^\-/","",trim($tmp[1])));
-      $vendor = trim($tmp[0]);
-      $model  = trim(preg_replace("/".$vendor."/","",$name));
+      $name   = @trim(preg_replace("/^\-/","",trim($tmp[1])));
+      $vendor = @trim($tmp[0]);
+      $model  = @trim(preg_replace("/".$vendor."/","",$name));
     }    
 
     /* Check if parse was successfull */