From: psc Date: Tue, 7 Jul 2009 12:51:04 +0000 (+0000) Subject: Print a error message if files are 0-byte long, X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf8bd92da5c1abb94adb21ddda994aeb6e127943;p=gosa.git Print a error message if files are 0-byte long, instead of trying to parse that empty file. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13902 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc b/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc index db3e50c60..db881d226 100644 --- a/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc +++ b/trunk/gosa-plugins/goto/admin/systems/ppd/class_ppdManager.inc @@ -162,7 +162,11 @@ class ppdManager } function loadProperties($ppdFile) - { + { + if(!(filesize($ppdFile))) { + trigger_error(_('Parsing PPD file failed - File has 0 bytes')); + } + $group= ""; $option= ""; $properties= array(); @@ -290,7 +294,11 @@ class ppdManager } function loadDescription($ppdFile) - { + { + if(!(filesize($ppdFile))) { + trigger_error(_('Parsing PPD file failed - File has 0 bytes')); + } + $ppdDesc = array(); /* Only parse complete PPD file again, if it was changed */