[freeside-commits] freeside/FS/FS svc_Common.pm,1.30,1.31
Ivan,,,
ivan at wavetail.420.am
Mon Dec 5 11:01:06 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv12366
Modified Files:
svc_Common.pm
Log Message:
avoid uninitialized value errors
Index: svc_Common.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_Common.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- svc_Common.pm 28 Nov 2005 16:59:55 -0000 1.30
+++ svc_Common.pm 5 Dec 2005 19:01:04 -0000 1.31
@@ -51,8 +51,8 @@
$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}='';
More information about the freeside-commits
mailing list