X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_Common.pm;h=962e36a07d0cc047590a0c899f23e73a7f30b0bb;hb=a5a4afbb77bbdffc25ae94d10b645b0bcc76e859;hp=6e8a5c38eb6fba2e1ff970c3f1d63be95b79efe6;hpb=8d9080142d35a17e3450e9c607f390d39da69188;p=freeside.git diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 6e8a5c38e..962e36a07 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -2,6 +2,7 @@ package FS::svc_Common; use strict; use vars qw( @ISA $noexport_hack $DEBUG ); +use Carp; use FS::Record qw( qsearch qsearchs fields dbh ); use FS::cust_main_Mixin; use FS::cust_svc; @@ -50,8 +51,8 @@ sub new { $self->{'Hash'} = { map { $_ => $newhash->{$_} } qw(svcnum svcpart) }; $self->setdefault; $self->{'Hash'}{$_} = $newhash->{$_} - foreach #grep length($newhash->{$_}), - keys %$newhash; + foreach grep { defined($newhash->{$_}) && length($newhash->{$_}) } + keys %$newhash; foreach my $field ( grep !defined($self->{'Hash'}{$_}), $self->fields ) { $self->{'Hash'}{$field}='';