From cf8bd92da5c1abb94adb21ddda994aeb6e127943 Mon Sep 17 00:00:00 2001 From: psc Date: Tue, 7 Jul 2009 12:51:04 +0000 Subject: [PATCH] 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 --- .../goto/admin/systems/ppd/class_ppdManager.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 */ -- 2.30.2