sub check {
my $self = shift;
- $self->locationnum('') if $self->locationnum == 0 || $self->locationnum == -1;
+ $self->locationnum('')
+ if defined($self->locationnum) && length($self->locationnum)
+ && ( $self->locationnum == 0 || $self->locationnum == -1 );
my $error =
$self->ut_numbern('pkgnum')