diff --git a/lam/lib/pdfstruct.inc b/lam/lib/pdfstruct.inc index 2f534f39..46c5c3dd 100644 --- a/lam/lib/pdfstruct.inc +++ b/lam/lib/pdfstruct.inc @@ -105,7 +105,8 @@ function savePDFStructureDefinitions($scope,$definition) { return 'no perms'; } else { - $handle = fopen($struct_file,'w'); + $handle = @fopen($struct_file,'w'); + if (!$handle) return 'no perms'; $pdf_attributes = ''; foreach($_SESSION['currentPageDefinitions'] as $key => $value) { if($key != 'type') {