diff options
author | ivan <ivan> | 2005-12-05 19:01:04 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-12-05 19:01:04 +0000 |
commit | 89c484c1cd1ece3a4fa7d899d68d03966ad08027 (patch) | |
tree | 5ea5aab97d02ff68d2eb7aae0df5c3aa5647ed8b | |
parent | d5cab3c80bef3d7e2c538e7488af1f3fb0008af9 (diff) |
avoid uninitialized value errors
-rw-r--r-- | FS/FS/svc_Common.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index d5083fd..962e36a 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -51,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}=''; |