Nicht abgfangene Typenkonvertierung in ca.pl
[kivitendo-erp.git] / bin / mozilla / ar.pl
index 88c0aef..ced937e 100644 (file)
@@ -48,10 +48,6 @@ require "bin/mozilla/reportgenerator.pl";
 use strict;
 #use warnings;
 
-1;
-
-# end of main
-
 # this is for our long dates
 # $locale->text('January')
 # $locale->text('February')
@@ -177,7 +173,7 @@ sub create_links {
   map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
 
   # customers
-  if (@{ $form->{all_customer} }) {
+  if (@{ $form->{all_customer} || [] }) {
     $form->{customer} = "$form->{customer}--$form->{customer_id}";
     map { $form->{selectcustomer} .= "<option>$_->{name}--$_->{id}\n" }
       (@{ $form->{all_customer} });
@@ -1273,7 +1269,7 @@ sub search {
   # setup customer selection
   $form->all_vc(\%myconfig, "customer", "AR");
 
-  if (@{ $form->{all_customer} }) {
+  if (@{ $form->{all_customer} || [] }) {
     map { $customer .= "<option>$_->{name}--$_->{id}\n" }
       @{ $form->{all_customer} };
     $customer = qq|<select name=customer><option>\n$customer</select>|;
@@ -1753,3 +1749,5 @@ sub storno {
 
   $main::lxdebug->leave_sub();
 }
+
+1;