Permalink
Browse files

Squelch warnings if stylesheet param not defined

  • Loading branch information...
1 parent 547ee6e commit 7c57f2614f87a94e89f69a766f05454ca05ed917 J. David Bavousett committed May 3, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 misc/cronjobs/gather_print_notices.pl
@@ -73,9 +73,11 @@ sub usage {
my $template = C4::Output::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI );
my $stylesheet_contents = '';
-open STYLESHEET, '<', $stylesheet;
-while ( <STYLESHEET> ) { $stylesheet_contents .= $_ }
-close STYLESHEET;
+if ($stylesheet) {
+ open STYLESHEET, '<', $stylesheet;
+ while ( <STYLESHEET> ) { $stylesheet_contents .= $_ }
+ close STYLESHEET;
+}
$template->param(
stylesheet => $stylesheet_contents,

0 comments on commit 7c57f26

Please sign in to comment.