Code

Updated ppdManager
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Apr 2008 09:42:28 +0000 (09:42 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Apr 2008 09:42:28 +0000 (09:42 +0000)
-Fixed undefined index - The problem itself may not be fixed with this. The Ticket is still open.

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

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

index 06996b18e2e89c7638ee98bc6ad8cf016ed20d3b..2fe99311f4acb457f1f356258469e5d1f0b9b0cf 100644 (file)
@@ -146,10 +146,12 @@ class ppdManager
                }elseif(!is_writeable(preg_replace("#(^.*/).*$#","\\1",$ppdFile.".tmp"))){
                        msg_dialog::display(_("PPD manager error"), sprintf(_("The temporary file '%s' cannot be opened for writing."),$ppdFile.".tmp"), ERROR_DIALOG);
                }else{
-                       foreach ($properties as $name => $section){
-                               foreach ($section as $attribute => $value){
-                                       if (is_array($value)){
-                                               $this->updateAttribute($ppdFile, $name, $attribute, $value['_default']);
+                       if(is_array($properties)){
+                               foreach ($properties as $name => $section){
+                                       foreach ($section as $attribute => $value){
+                                               if (is_array($value)){
+                                                       $this->updateAttribute($ppdFile, $name, $attribute, $value['_default']);
+                                               }
                                        }
                                }
                        }
@@ -352,5 +354,5 @@ class ppdManager
        }
 
 }
-
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>