Array-Wanldung von undefinierten Werten verhindern
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 5 Oct 2010 13:54:20 +0000 (15:54 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 5 Oct 2010 13:58:21 +0000 (15:58 +0200)
Passiert, wenn keine Drucker angelegt sind.

bin/mozilla/io.pl

index adaa399..b40e7ed 100644 (file)
@@ -1166,7 +1166,7 @@ sub print_options {
 
   push @MEDIA, grep $_,
       opthash("screen",              $form->{OP}{screen},              $locale->text('Screen')),
-    (scalar @{ $form->{printers} } && $main::latex_templates) ?
+    ($form->{printers} && scalar @{ $form->{printers} } && $main::latex_templates) ?
       opthash("printer",             $form->{OP}{printer},             $locale->text('Printer')) : undef,
     ($main::latex_templates && !$options{no_queue}) ?
       opthash("queue",               $form->{OP}{queue},               $locale->text('Queue')) : undef