silence a warning
[freeside.git] / FS / FS / cust_bill_pkg.pm
index 2c15715..267804b 100644 (file)
@@ -470,7 +470,7 @@ sub details {
 
     my $sql = "SELECT detail FROM cust_bill_pkg_detail ".
               "  WHERE billpkgnum = ". $self->billpkgnum.
-              "    AND ( format IS NULL OR format != 'C' ".
+              "    AND ( format IS NULL OR format != 'C' ".
               "  ORDER BY detailnum";
     my $sth = dbh->prepare($sql) or die dbh->errstr;
     $sth->execute or die $sth->errstr;
@@ -531,7 +531,7 @@ sub details {
 
     #avoid the fetchall_arrayref and loop for less memory usage?
 
-    map { $_->[0] eq 'C'
+    map { (defined($_->[0]) && $_->[0] eq 'C')
             ? &{$format_sub}(      $_->[1] )
             : &{$escape_function}( $_->[1] );
         }